https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116154

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> 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 .

Hmm, this is not documented in internals manual either. I thought it was.

Examples patches from before:
https://inbox.sourceware.org/gcc-patches/4aac5e64-ec17-5ff8-9cad-1e09c2007...@codesourcery.com/
https://inbox.sourceware.org/gcc-patches/CA+=Sn1mnnVXFQEGtno_9wE1oJM0mCs8GNc-cv5oVxO7856Sy=q...@mail.gmail.com/


I thought there has been others (before my one) but I can't find them.

Reply via email to