http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60911
Bug ID: 60911 Summary: [4.9/4.10 Regression] wrong code with -O2 -flto -fipa-pta Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Created attachment 32646 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32646&action=edit reduced testcase (gcc.dg/torture/pr30665-1.c) Output: $ gcc -O2 -flto -fipa-pta testcase.c $ ./a.out Aborted Relevant objdump output: 0000000000400530 <main>: 400530: 48 83 ec 28 sub rsp,0x28 400534: 48 8d 74 24 10 lea rsi,[rsp+0x10] 400539: 48 89 e7 mov rdi,rsp 40053c: c7 04 24 ad 3a 00 00 mov DWORD PTR [rsp],0x3aad 400543: c7 44 24 04 d1 5a 00 mov DWORD PTR [rsp+0x4],0x5ad1 40054a: 00 40054b: c7 44 24 10 19 45 00 mov DWORD PTR [rsp+0x10],0x4519 400552: 00 400553: c7 44 24 14 a0 5b 00 mov DWORD PTR [rsp+0x14],0x5ba0 40055a: 00 40055b: e8 10 01 00 00 call 400670 <f.constprop.0> 400560: e8 9b ff ff ff call 400500 <abort@plt> 400565: 0f 1f 00 nop DWORD PTR [rax] abort() is called unconditionally