https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80416
Bug ID: 80416 Summary: FAIL: g++.dg/torture/pr79671.C -O2 execution test Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sch...@linux-m68k.org Target Milestone: --- Target: ia64-*-* On ia64, pr79671.C fails with -O2, -O3 and -Os, but succeeds with -O1 and -O2 -flto. When it fails foo looks like this: 0x4000000000000800 <+0>: [MMI] nop.m 0x0 0x4000000000000801 <+1>: st4 [r12]=r0 0x4000000000000802 <+2>: nop.i 0x0;; 0x4000000000000810 <+16>: [MIB] ld4 r8=[r14] 0x4000000000000811 <+17>: nop.i 0x0 0x4000000000000812 <+18>: br.ret.sptk.many b0;; When it succeeds it looks like this: 0x4000000000000720 <+0>: [MMI] adds r14=4,r12;; 0x4000000000000721 <+1>: st4 [r14]=r0 0x4000000000000722 <+2>: nop.i 0x0;; 0x4000000000000730 <+16>: [MIB] ld4 r8=[r14] 0x4000000000000731 <+17>: nop.i 0x0 0x4000000000000732 <+18>: br.ret.sptk.many b0;; Looks like the miscompilation happens during the dse1 pass.