trunk-g/gcc> ./xgcc -B. -o t -O2 t.c -fno-inline -fwhole-program t.c: In function 's4.constprop.0': t.c:4:6: 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.
#include <stdio.h> #define SIZE 40000 void s4 (float *a) { (void) __builtin_memset ((void *) a, 0, sizeof(float)*SIZE); } int main () { static float a[SIZE]; int i; printf("Start\n"); for (i = 0; i < SIZE; i++) s4 (a); printf("Done\n"); return 0; } we have a VOID result decl ... Program received signal SIGSEGV, Segmentation fault. 0x0000000000a17e84 in get_ref_base_and_extent (exp=0x7ffff7edd900, poffset=0x7fffffffd670, psize=0x7fffffffd678, pmax_size=0x7fffffffd680) at /space/rguenther/src/svn/trunk/gcc/tree-dfa.c:941 941 if (maxsize == -1 (gdb) l 936 937 if (DECL_P (exp)) 938 { 939 /* If maxsize is unknown adjust it according to the size of the 940 base decl. */ 941 if (maxsize == -1 942 && TREE_CODE (DECL_SIZE (exp)) == INTEGER_CST) (gdb) call debug_tree (exp) <result_decl 0x7ffff7edd900 D.3219 type <void_type 0x7ffff7ee7e70 void VOID align 8 symtab 0 alias set -1 canonical type 0x7ffff7ee7e70 pointer_to_this <pointer_type 0x7ffff7ee7f18>> used ignored VOID file t.c line 4 col 6 align 8 context <function_decl 0x7ffff5b94300 s4.constprop.0> abstract_origin <result_decl 0x7ffff7edd300 D.2008>> It looks like we build this result decl during versioning? -- Summary: [4.6 Regression] ICE with tree tailcall and ipa-cp Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44635