------- Comment #2 from jamborm at gcc dot gnu dot org 2009-09-02 15:54 ------- (In reply to comment #0) I was able to re-produce and fix the error using the reduced test case but the testcase given in the description - c43205b - does not fail for me anywhere.
> > Looks like the new SRA is not fully prepared to handle arrays with > non-constant bounds for its TYPE_DOMAIN. > Right. The following patch will stop SRA from looking at such arrays. After this gets in, can you please add the reduced test case to the test suite? I am not sure where (and exactly how) to put it. Thanks. 2009-09-02 Martin Jambor <mjam...@suse.cz> * tree-sra.c (type_internals_preclude_sra_p): Disqualify array types with non-constant domain bounds. Index: mine/gcc/tree-sra.c =================================================================== --- mine.orig/gcc/tree-sra.c +++ mine/gcc/tree-sra.c @@ -548,6 +548,8 @@ type_internals_preclude_sra_p (tree type return false; case ARRAY_TYPE: + if (TREE_CODE (TYPE_MIN_VALUE (TYPE_DOMAIN (type))) != INTEGER_CST) + return false; et = TREE_TYPE (type); if (AGGREGATE_TYPE_P (et)) -- jamborm at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jamborm at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-09-02 15:54:58 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41112