The SPEC CPU2000 tests bzip2, gap, and gcc cause mainline GCC to segfault when built on powerpc64-linux with: -m32 -O2 -ftree-vectorize -maltivec -mabi=altivec \ --param ggc-min-expand=0 --param ggc-min-heapsize=0 Every single CPU2000 test fails to build with those options and -m64 instead of -m32. gap, facerec, and apsi sometimes fail with -m64 without the ggc params defined, as mentioned in comment 4 of PR 21155. This minimized test case demonstrates the bug: extern void bar (unsigned char *, int, int); unsigned char l[6][4]; int c[6][4]; void foo (int n, int a) { int t, i; int x; for (t = 0; t < n; t++) { for (i = 0; i < a; i++) x = l[t][i]; bar (&l[t][0], x, a); } } gdb shows the segfault at gcc/tree-chrec.c:1048 ct=0xa5a5a5a5. The backtrace is too messy for cut-and-paste but shows chrec_convert interpret_rhs_modify_expr analyze_scalar_evolution_1 analyze_scalar_evolution simple_iv number_of_iterations_exit number_of_iterations_in_loop canonicalize_loop_induction_variables tree_unroll_loops_completely tree_complete_unroll execute_pass_list ... SPEC CPU2000 with the ggc params set to zero all build with "-O2" and with "-O2 -ftree-loop-linear". The failure shows up with this patch from radkver: http://gcc.gnu.org/ml/gcc-cvs/2005-05/msg00302.html Just to make things even more interesting, add "-fprofile-generate" and the test case starts failing in the same place on 20050428 with this patch from bonzini, which suggests it's a latent bug unrelated to these patches: http://gcc.gnu.org/ml/gcc-cvs/2005-04/msg01463.html
-- Summary: poisoned ggc memory used for -ftree-vectorize Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janis at gcc dot gnu dot org CC: dorit at il dot ibm dot com,gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc64-linux GCC host triplet: powerpc64-linux GCC target triplet: powerpc64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21639