OSDN Git Service

Merge from transactional-memory branch.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / c-c++-common / tm / attrib-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm" } */
3
4 #define TC      __attribute__((transaction_callable))
5 #define TU      __attribute__((transaction_unsafe))
6 #define TP      __attribute__((transaction_pure))
7 #define TS      __attribute__((transaction_safe))
8 extern void f1(void) TC;
9 extern void f2(void) TU;
10 extern void f3(void) TP;
11 extern void f4(void) TS;
12
13 extern void g1(void) TC TS;     /* { dg-error "previously declared" } */
14
15 extern int v1 TP;               /* { dg-warning "ignored" } */
16
17 typedef void t1(void) TC;
18 typedef void (*t2)(void) TC;
19 typedef int t3 TC;              /* { dg-warning "ignored" } */
20
21 typedef void u0(void);
22 typedef u0 u1 TC;
23 typedef u1 u2 TP;               /* { dg-error "previously declared" } */
24 typedef u0 *u3 TS;
25 typedef u3 u4 TU;               /* { dg-error "previously declared" } */