]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tm/pr52141.c
0dabf76ce6dac69107021903f8277a6e301be631
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tm / pr52141.c
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O0 -w" } */
3
4 __attribute__((always_inline))
5 static void asmfunc(void)
6 {
7 __asm__ (""); /* { dg-error "asm not allowed in .transaction_safe" } */
8 }
9
10 __attribute__((transaction_safe))
11 static void f(void)
12 {
13 asmfunc();
14 }
15
16 int main()
17 {
18 __transaction_atomic {
19 f();
20 }
21 return 0;
22 }
23
24 /* { dg-message "inlined from \'f\'" "" { target *-*-* } 0 } */