diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-28 15:29:23 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-28 15:29:23 +0000 |
commit | ebe5673b05e0fec93626ccdde618e606524ba50f (patch) | |
tree | 0924c88581b17c07c4c31b366a283494e02772f1 /gcc/testsuite/gcc.dg/tm | |
parent | 50da60d048aa4fbf677ca658b146acf33a0241b4 (diff) | |
download | gcc-ebe5673b05e0fec93626ccdde618e606524ba50f.tar.gz |
* c-family/c-common.c (handle_tm_wrap_attribute): Handle decl
argument.
* testsuite/c-c++-common/tm/wrap-2.c: Move...
* testsuite/gcc.dg/tm/wrap-2.c: ...here.
* testsuite/g++.dg/tm/wrap-2.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@180619 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm')
-rw-r--r-- | gcc/testsuite/gcc.dg/tm/wrap-2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/wrap-2.c b/gcc/testsuite/gcc.dg/tm/wrap-2.c new file mode 100644 index 00000000000..29486335a44 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tm/wrap-2.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-fgnu-tm" } */ + +#define W(X) __attribute__((transaction_wrap(X))) +void f1(void); +void f2(int); +int i3; +int f7(void); + +void g1(void) W(f1); +void g2(void) W(f2); /* { dg-error "is not compatible" } */ +void g3(void) W(i3); /* { dg-error "is not a function" } */ +void g4(void) W(f4); /* { dg-error "is not a function" } */ +void g5(void) W(1); /* { dg-error "not an identifier" } */ +void g6(void) W("f1"); /* { dg-error "not an identifier" } */ +void g7(void) W(f7); /* { dg-error "is not compatible" } */ |