[Bug tree-optimization/78248] [7 Regression] wrong code at -Os and above on x86_64-linux-gnu (in both 32-bit and 64-bit modes)
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 9 09:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78248
--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Martin Liška from comment #6)
> Still can't reproduce. Can you please paste output of
> gcc-trunk -Os small.c --verbose
It fails for me:
Program received signal SIGSEGV, Segmentation fault.
main () at pr78248.c:16
16 d = b[e];
(gdb)
valgrind says:
==18918== Invalid read of size 4
==18918== at 0x40046C: main (pr78248.c:16)
==18918== Address 0x601000 is not stack'd, malloc'd or (recently) free'd
==18918==
==18918==
==18918== Process terminating with default action of signal 11 (SIGSEGV)
==18918== Access not within mapped region at address 0x601000
==18918== at 0x40046C: main (pr78248.c:16)
==18918== If you believe this happened as a result of a stack
==18918== overflow in your program's main thread (unlikely but
==18918== possible), you can try to increase the size of the
==18918== main thread stack using the --main-stacksize= flag.
==18918== The main thread stack size used in this run was 10485760.
More information about the Gcc-bugs
mailing list