[Bug target/38981] [4.4 regression] internal compiler error
--- Comment #13 from ebotcazou at gcc dot gnu dot org 2009-02-08 10:11 --- Btw, the default extension for preprocessed sources is .i, just pass -save-temps to the compiler to get the file. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |ebotcazou at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Component|bootstrap |target Last reconfirmed|2009-02-08 10:09:42 |2009-02-08 10:11:55 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38981
[Bug target/38981] [4.4 regression] internal compiler error
--- Comment #14 from ebotcazou at gcc dot gnu dot org 2009-02-08 10:26 --- This is a bug in the qsort implementation on Solaris 8: Breakpoint 1, sort_coalesce_list (cl=0x1ce4b80) at /nile.build/botcazou/gcc-head/src/gcc/tree-ssa-coalesce.c:434 434 qsort (cl-sorted, num, sizeof (coalesce_pair_p), compare_pairs); (gdb) p cl-sorted $22 = (coalesce_pair_p *) 0x1cc4e88 (gdb) p num $23 = 8 (gdb) continue Continuing. Program received signal SIGSEGV, Segmentation fault. 0x00f1bb00 in compare_pairs (p1=0x1cc4e84, p2=0x1cc4e8c) at /nile.build/botcazou/gcc-head/src/gcc/tree-ssa-coalesce.c:318 318 result = (* pp2)-cost - (* pp1)-cost; i.e. the comparator is invoked on cl-sorted[-1], which is invalid. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38981
[Bug target/38981] [4.4 regression] internal compiler error
--- Comment #15 from ebotcazou at gcc dot gnu dot org 2009-02-08 10:58 --- This is a bug in the qsort implementation on Solaris 8: Browsing the Sun database shows several related tickets, but most have been closed as not a defect on the ground that the comparator function fails to impose a total order on the array. That's the case here because of overflow: (gdb) p cl-sorted[0].cost $29 = 2147483646 (gdb) p cl-sorted[1].cost $30 = -2147483644 (gdb) p cl-sorted[2].cost $31 = -2147483648 (gdb) p cl-sorted[3].cost $32 = 2 (gdb) p cl-sorted[4].cost $33 = -2147483648 (gdb) p cl-sorted[5].cost $34 = 2 (gdb) p cl-sorted[6].cost $35 = 2147483646 (gdb) p cl-sorted[7].cost $36 = 2147483646 Breakpoint 2, compare_pairs (p1=0x1cc4e88, p2=0x1cc4e8c) at /nile.build/botcazou/gcc-head/src/gcc/tree-ssa-coalesce.c:314 314 const_coalesce_pair_p const *const pp1 = (const_coalesce_pair_p const *) p1; (gdb) next 315 const_coalesce_pair_p const *const pp2 = (const_coalesce_pair_p const *) p2; (gdb) 318 result = (* pp2)-cost - (* pp1)-cost; (gdb) p (* pp2)-cost $46 = -2147483644 (gdb) p (* pp1)-cost $47 = 2147483646 (gdb) next 322 if (result == 0) (gdb) p result $48 = 6 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38981