This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] correct atomic_compare_exchange_n return type (c++/71675)


On 07/25/2016 05:03 AM, Renlin Li wrote:
Hi Martin,

I observed the following error:

ERROR: gcc.dg/atomic/pr71675.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects : syntax error in target selector "target c11" for
" dg-do 3 compile { target c11 } "

It seems we don't have a c11 effective target check available
in dejagnu target-supports.exp.

Thanks for pointing this out.  I had trouble getting this or any
of the other atomic tests to run on their own with make check-c
RUNTESTFLAGS='atomic.exp'  They simply don't.  I didn't notice
a failure in the full test suite run and since the test compiled
successfully outside DejaGnu I didn't take the time to understand
why it wouldn't run on its own or with the rest of the atomic
subset, or to confirm that the c11 target selector was understood.
Looks like I managed to run into not one but two gotchas with
this trivial test.

I've committed r238766 and replaced the unsupported target selector
with a dg-options directive as Jeff and Jason suggested.

Martin


Thanks,
Renlin

diff --git a/gcc/testsuite/gcc.dg/atomic/pr71675.c
b/gcc/testsuite/gcc.dg/atomic/pr71675.c
new file mode 100644
index 0000000..0e344ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/pr71675.c
@@ -0,0 +1,32 @@
+/* PR c++/71675 - __atomic_compare_exchange_n returns wrong type for
typed enum
+ */
+/* { dg-do compile { target c11 } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]