~/gcc/trunk/gcc/tmp/gcc$ ./xgcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --disable-bootstrap --enable-languages=c Thread model: posix gcc version 4.5.0 20100321 (experimental) [trunk revision 157602] (GCC) ~/gcc/trunk/gcc/tmp/gcc$ cat ~/ice.i #pragma GCC optimize ("O2")
struct intrinfo_entry { unsigned vector_base; unsigned cascade_vector; unsigned cpu_intr_base; }; extern unsigned intrinfo_num; extern struct intrinfo_entry *intrinfoptr; struct level_label { int secondary; }; static void calculate_combines(struct level_label *labels) { unsigned i; int level; for(i = 0; i < intrinfo_num; ++i) { struct intrinfo_entry *iip = &intrinfoptr[i]; if(!labels[level].secondary) { unsigned j; for(j = intrinfo_num - 1; j > i; --j) { struct intrinfo_entry *iip2 = &intrinfoptr[j]; if(iip2->cascade_vector == iip->cascade_vector) get_interrupt_level(0, iip2->vector_base); } } } } void cpu_interrupt_init(unsigned num_levels) { struct level_label *labels; calculate_combines(labels); } ~/gcc/trunk/gcc/tmp/gcc$ ./xgcc -B. ~/ice.i /home/ryan/ice.i: In function ‘calculate_combines’: /home/ryan/ice.i:30:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE using pragma GCC optimize("O2") Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rmansfield at qnx dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43466