Bug 43589

Summary: segmentation fault after using __attribute__((optimize()))
Product: gcc Reporter: liangpeng <ictlpeng>
Component: middle-endAssignee: Not yet assigned to anyone <unassigned>
Severity: normal CC: gcc-bugs, jiez, sezeroz, tbsaunde
Priority: P3    
Version: 4.4.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: 4.4.3, 4.5.0 Last reconfirmed: 2010-03-30 09:39:21
Attachments: Test case susan.i

Description liangpeng 2010-03-30 04:02:14 UTC
A segmentation fault(ipa-cp.c ipcp_lattice_changed (old_lat=0x7ffffbf46080, 
new_lat=0x0)) comes up if we:
declare function Mibench > automotive_susan_e > susan.c:susan_edges() with __attribute__((optimize(3))) 
declare function Mibench > automotive_susan_e > susan.c:susan_edges_small() with __attribute__((optimize(1))) 
declare function Mibench > automotive_susan_e > susan.c:susan_corners_quick() with __attribute__((optimize(3))) 

complete command line and compiler output :
$~/ici/install/bin/gcc -lm -O3 -c susan.c
susan.c:2122: internal compiler error: Segmentation fault

System type:
Using built-in specs.
Target: x86_64-unknown-linux-gnu

Configured with: 
--prefix=/home/lpeng/ici/install --with-mpfr=/home/common/tools/mpfr-2.4.1
--with-ppl=/home/common/tools/ppl-0.10.2 --with-cloog=/home/common/tools/cloog
Thread model: posix

gcc version 4.4.0 (GCC)
Comment 1 liangpeng 2010-03-30 04:03:44 UTC
Created attachment 20256 [details]
Test case susan.i
Comment 2 Richard Biener 2010-03-30 09:39:21 UTC
Comment 3 tbsaunde 2015-12-30 14:48:50 UTC
can't reproduce with debian gcc {4.6,4.7,4.8,4.9,5.} or trunk.  Seems this got fixed at some point.