summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tm/pr52141.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm/pr52141.c')
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr52141.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/pr52141.c b/gcc/testsuite/gcc.dg/tm/pr52141.c
new file mode 100644
index 00000000000..0dabf76ce6d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/pr52141.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O0 -w" } */
+
+__attribute__((always_inline))
+static void asmfunc(void)
+{
+ __asm__ (""); /* { dg-error "asm not allowed in .transaction_safe" } */
+}
+
+__attribute__((transaction_safe))
+static void f(void)
+{
+ asmfunc();
+}
+
+int main()
+{
+ __transaction_atomic {
+ f();
+ }
+ return 0;
+}
+
+/* { dg-message "inlined from \'f\'" "" { target *-*-* } 0 } */