When building Cuba-1.6 (http://www.feynarts.de/cuba/Cuba-1.6.tar.gz) via configure && make, there is an internal compiler error (segmentation fault) in the compilation of Divonne.c. This may or may not be related to #41155. gcc says: gcc-4.4.3 -O3 -fomit-frame-pointer -ffast-math -DHAVE_CONFIG_H -I../Cuba-1.6/src/common -I. -I../Cuba-1.6 -I../Cuba-1.6/src/divonne -c -o Divonne.o ../Cuba-1.6/src/divonne/Divonne.c In file included from ../Cuba-1.6/src/divonne/common.c:19, from ../Cuba-1.6/src/divonne/Divonne.c:41: ../Cuba-1.6/src/divonne/Split.c: In function 'Split': ../Cuba-1.6/src/divonne/Split.c:275: internal compiler error: Segmentation fault This error occurs for gcc-4.4.3 with -O3, -O2, and -O1 but neither with -O0 nor for gcc-4.4.2
Please follow the instructions here http://gcc.gnu.org/bugs/#report provide a preprocessed file. Thanks.
Created attachment 19804 [details] preprocessed source
Confirmed at -O2. Reducing. ../Cuba-1.6/src/divonne/Split.c: In function 'Split': ../Cuba-1.6/src/divonne/Split.c:275:13: error: expected an SSA_NAME object ../Cuba-1.6/src/divonne/Split.c:275:13: error: in statement D.15203_353 = D.8489 /[ex] 8; ../Cuba-1.6/src/divonne/Split.c:275:13: internal compiler error: verify_ssa failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
typedef const int cint; typedef struct { } Bounds; int ndim_, ncomp_, selectedcomp_, nregions_; void *voidregion_; typedef struct { double diff, err, spread; } Errors; typedef const Errors cErrors; void Split(int iregion, int depth, int xregion) { typedef struct { double avg, err, spread, chisq; double xmin[ndim_], xmax[ndim_]; } Result; typedef struct region { Result result[ncomp_]; } Region; Errors errors[ncomp_]; int comp, ireg, xreg; double tmp; for( ireg = iregion, xreg = xregion; ireg < nregions_; ireg = xreg++ ) { Result *result = ((Region *)voidregion_)[ireg].result; for( comp = 0; comp < ncomp_; ++comp ) { Result *r = &result[comp]; cErrors *e = &errors[comp]; double c = tmp*e->diff; if( r->err > 0 ) r->err = r->err*e->err + c; } } }
Mine.
Subject: Bug 42956 Author: rguenth Date: Sun Feb 7 13:42:52 2010 New Revision: 156571 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156571 Log: 2010-02-07 Richard Guenther <rguenther@suse.de> PR middle-end/42956 * gimplify.c (gimple_fold_indirect_ref): Avoid generating new ARRAY_REFs on variable size element or minimal index arrays. Complete. * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Use gimple_fold_indirect_ref. * gcc.c-torture/compile/pr42956.c: New testcase. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr42956.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimplify.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-loop-ivopts.c
Fixed for 4.5.0 sofar.
P1 for a regression on a release branch.
Still needs to be applied to GCC 4.4.
The "Complete." part shouldn't be backported.
Subject: Bug 42956 Author: rguenth Date: Thu Apr 8 11:47:13 2010 New Revision: 158123 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158123 Log: 2010-04-08 Richard Guenther <rguenther@suse.de> PR middle-end/42956 * gimplify.c (gimple_fold_indirect_ref): Avoid generating new ARRAY_REFs on variable size element or minimal index arrays. * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Use gimple_fold_indirect_ref. * gcc.c-torture/compile/pr42956.c: New testcase. Added: branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr42956.c Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/gimplify.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog branches/gcc-4_4-branch/gcc/tree-ssa-loop-ivopts.c
Fixed.