testsuite: Fix up builtin-prefetch-1.c tests
Checks
Commit Message
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(-)
Comments
On 11/1/24 11:16 AM, Xi Ruoyao wrote:
> 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.
OK. I was seeing similar failures in my tester, but hadn't started to
analyze yet.
Jeff
On Fri, 2024-11-01 at 11:41 -0600, Jeff Law wrote:
>
>
> On 11/1/24 11:16 AM, Xi Ruoyao wrote:
> > 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.
> OK. I was seeing similar failures in my tester, but hadn't started to
> analyze yet.
Pushed to trunk.
> From: Xi Ruoyao <xry111@xry111.site>
> Sent: Saturday, November 2, 2024 1:50 AM
\
> > On 11/1/24 11:16 AM, Xi Ruoyao wrote:
> > > 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.
> > OK. I was seeing similar failures in my tester, but hadn't started to
> > analyze yet.
>
> Pushed to trunk.
I have a patch get approved to also fix that just waiting for another day.
But still thank for fixing that!
Thx,
Haochen
>
> --
> Xi Ruoyao <xry111@xry111.site>
> School of Aerospace Science and Technology, Xidian University
> From: Xi Ruoyao <xry111@xry111.site>
> Sent: Saturday, November 2, 2024 1:16 AM
>
> How can you use "read-shared" as an identifier? It's not allowed by all C
> standard versions.
>
I did a last minute change to fix that but unfortunately did not get into
my patch.
My apology.
Thx,
Haochen
@@ -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];
@@ -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];