[Bug tree-optimization/103226] [12 Regression] Recent change to copy-headers causes execution failure for gcc.dg/torture/pr80974
aldyh at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 17 18:43:44 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103226
--- Comment #16 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #15)
> Re: c#13. You were so close :-) Add "-msim" to your command line. THat's
> one of the things the baseboards file does for you when you run things under
> dejagnu on bfin-elf...
>
> I've sent Aldy instructions to access an AWS instance I've set up for
> debugging.
Oh, that's funny. I just logged into the AWS instance only to notice that your
instructions contained -msim.
I can now run a hello world on my cross build, but still cannot reproduce the
problem:
tor:~/bld/bfin/install/bin$ cat a.c
main(){printf("hello world\n"); }
tor:~/bld/bfin/install/bin$ ./bfin-elf-gcc a.c -w -msim -O2
tor:~/bld/bfin/install/bin$ ./bfin-elf-run ./a.out
hello world
tor:~/bld/bfin/install/bin$ cat j.c
/* { dg-do run } */
int a, b, c, d, e, f, g[4];
static int fn1 ()
{
int h, i;
if (b)
goto L1;
L2:;
int m = a;
while (1)
{
int n = 2;
e = !f && (n = 5);
if (e)
for (h = 0; h < 9; h++)
for (i = 0; i < 6; i++)
if (a)
g[h] = 4;
if (d)
goto L2;
a & n || b;
L1:
if (a)
L3:
c = m;
if (a)
goto L3;
if (b < 5)
return 0;
}
}
int main ()
{
fn1 ();
return 0;
}
tor:~/bld/bfin/install/bin$ ./bfin-elf-gcc j.c -w -msim -O2
tor:~/bld/bfin/install/bin$ ./bfin-elf-run ./a.out
tor:~/bld/bfin/install/bin$
However, I can reproduce on the AWS instance:
[root@ip-172 gcc]# bfin-elf-gcc -msim -O2 j.c
[root@ip-172 gcc]# bfin-elf-run a.out
[long wait]
Strange.
More information about the Gcc-bugs
mailing list