[Bug testsuite/116154] gcc.dg/torture/pr67947.c fails on pru-unknown-elf
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 31 01:16:44 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116154
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |testsuite-fail
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=116155
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this is just a testsuite issue with this:
if (argc == 0)
b = 1;
This might fix it:
```
diff --git a/gcc/testsuite/gcc.dg/torture/pr67947.c
b/gcc/testsuite/gcc.dg/torture/pr67947.c
index 368a8b20cbf..1016f2579cb 100644
--- a/gcc/testsuite/gcc.dg/torture/pr67947.c
+++ b/gcc/testsuite/gcc.dg/torture/pr67947.c
@@ -11,11 +11,13 @@ __attribute__((noinline, noclone)) void foo (int x)
c++;
}
+volatile int t = 1;
+
int
main (int argc, char* argv[])
{
int j, k, b = 0;
- if (argc == 0)
+ if (t == 0)
b = 1;
for (j = 0; j < 3; j++)
for (k = 0; k < 1; k++)
```
That is for simulator runs you can't depend on the value of argc being 1 .
More information about the Gcc-bugs
mailing list