How can you use "read-shared" as an identifier?  It's not allowed by all
C standard versions.

gcc/testsuite/ChangeLog:

        * gcc.c-torture/execute/builtin-prefetch-1.c (rws): Use
        "read_shared" instead of "read-shared" as the identifier for
        enum value.
        * gcc.dg/builtin-prefetch-1.c (rws): Likewise.
---

Bootstrapped and regtested on x86_64-linux-gnu.  The following test
failures are resolved:

< FAIL: gcc.c-torture/execute/builtin-prefetch-1.c   -O0  (test for excess 
errors)
< UNRESOLVED: gcc.c-torture/execute/builtin-prefetch-1.c   -O0  compilation 
failed to produce executable
< FAIL: gcc.c-torture/execute/builtin-prefetch-1.c   -O1  (test for excess 
errors)
< UNRESOLVED: gcc.c-torture/execute/builtin-prefetch-1.c   -O1  compilation 
failed to produce executable
< FAIL: gcc.c-torture/execute/builtin-prefetch-1.c   -O2  (test for excess 
errors)
< UNRESOLVED: gcc.c-torture/execute/builtin-prefetch-1.c   -O2  compilation 
failed to produce executable
< FAIL: gcc.c-torture/execute/builtin-prefetch-1.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  (test for excess errors)
< UNRESOLVED: gcc.c-torture/execute/builtin-prefetch-1.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  compilation failed to produce 
executable
< FAIL: gcc.c-torture/execute/builtin-prefetch-1.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
< UNRESOLVED: gcc.c-torture/execute/builtin-prefetch-1.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  compilation failed to produce 
executable
< FAIL: gcc.c-torture/execute/builtin-prefetch-1.c   -O3 -g  (test for excess 
errors)
< UNRESOLVED: gcc.c-torture/execute/builtin-prefetch-1.c   -O3 -g  compilation 
failed to produce executable
< FAIL: gcc.c-torture/execute/builtin-prefetch-1.c   -Os  (test for excess 
errors)
< UNRESOLVED: gcc.c-torture/execute/builtin-prefetch-1.c   -Os  compilation 
failed to produce executable
< FAIL: gcc.dg/builtin-prefetch-1.c  (test for warnings, line 31)
< FAIL: gcc.dg/builtin-prefetch-1.c  (test for warnings, line 32)
< FAIL: gcc.dg/builtin-prefetch-1.c  (test for warnings, line 33)
< FAIL: gcc.dg/builtin-prefetch-1.c  (test for warnings, line 34)
< FAIL: gcc.dg/builtin-prefetch-1.c  (test for warnings, line 35)
< FAIL: gcc.dg/builtin-prefetch-1.c  (test for warnings, line 36)
< FAIL: gcc.dg/builtin-prefetch-1.c (test for excess errors)
< UNRESOLVED: gcc.dg/builtin-prefetch-1.c compilation failed to produce 
executable

Ok for trunk?

 gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-1.c | 2 +-
 gcc/testsuite/gcc.dg/builtin-prefetch-1.c                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-1.c 
b/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-1.c
index 03620c6ea6b..07b490dc1a6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-1.c
@@ -15,7 +15,7 @@ void exit (int);
 #define READ_ACCESS 0
 
 enum locality { none, low, moderate, high };
-enum rws { read, write, read-shared };
+enum rws { read, write, read_shared };
 
 int arr[10];
 
diff --git a/gcc/testsuite/gcc.dg/builtin-prefetch-1.c 
b/gcc/testsuite/gcc.dg/builtin-prefetch-1.c
index 7f75353795f..aadbf144cfe 100644
--- a/gcc/testsuite/gcc.dg/builtin-prefetch-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-prefetch-1.c
@@ -8,7 +8,7 @@
 extern void exit (int);
 
 enum locality { none, low, moderate, high, bogus };
-enum rws { read, write, read-shared };
+enum rws { read, write, read_shared };
 
 int arr[10];
 
-- 
2.47.0

Reply via email to