https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68986
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |trippels at gcc dot gnu.org Known to work| |4.9.3 Summary|internal compiler error: |[5/6 Regression] internal |Segmentation fault |compiler error: | |Segmentation fault --- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- PR69454 testcase only crashes with gcc-6: markus@x4 VEX % cat guest_amd64_helpers.i typedef struct { long long w64[2]; } V128; extern V128* fn2(void); long long a; V128 b; void fn1() { V128 *c = fn2(); c->w64[0] = a ^ b.w64[0]; } markus@x4 VEX % gcc -c -m32 -mpreferred-stack-boundary=2 -O2 guest_amd64_helpers.i guest_amd64_helpers.i: In function ‘fn1’: guest_amd64_helpers.i:8:1: internal compiler error: Segmentation fault } ^ 0xb2051f crash_signal ../../gcc/gcc/toplev.c:335 0x7f543f74614f ??? /home/markus/glibc/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0xe3d804 ix86_expand_prologue() ../../gcc/gcc/config/i386/i386.c:12751 0xff543a gen_prologue() ../../gcc/gcc/config/i386/i386.md:12451 0xe248e8 target_gen_prologue ../../gcc/gcc/config/i386/i386.md:18466 0x87a6ff thread_prologue_and_epilogue_insns() ../../gcc/gcc/function.c:6037 0x87b1d2 rest_of_handle_thread_prologue_and_epilogue ../../gcc/gcc/function.c:6588 0x87b1d2 execute ../../gcc/gcc/function.c:6630 Reduced testcase, crashes for gcc-5 and gcc-6: markus@x4 tmp % cat tracesig.ii struct { char msgdata[][8]; } __thread *mythread; char *fn1() { return mythread->msgdata[1]; } markus@x4 tmp % g++ -c -fPIC -mpreferred-stack-boundary=5 -mincoming-stack-boundary=4 tracesig.ii tracesig.ii: In function ‘char* fn1()’: tracesig.ii:4:44: internal compiler error: Segmentation fault char *fn1() { return mythread->msgdata[1]; } ^ 0xcfb38f crash_signal ../../gcc/gcc/toplev.c:335 0x7f22485a914f ??? /home/markus/glibc/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x1017c94 ix86_expand_prologue() ../../gcc/gcc/config/i386/i386.c:12751 0x11cf8ca gen_prologue() ../../gcc/gcc/config/i386/i386.md:12451 0xffed78 target_gen_prologue ../../gcc/gcc/config/i386/i386.md:18466 0xa5649f thread_prologue_and_epilogue_insns() ../../gcc/gcc/function.c:6037 0xa56f72 rest_of_handle_thread_prologue_and_epilogue ../../gcc/gcc/function.c:6588 0xa56f72 execute ../../gcc/gcc/function.c:6630 Please submit a full bug report,