> ./f951 -quiet mp2.fppized.f -O2 mp2.fppized.f: In function 'umpse': mp2.fppized.f:2889:0: internal compiler error: in chrec_fold_plus_1, at tree-chrec.c:272 SUBROUTINE UMPSE(EA,AIBJ,NOC,NDIM,NOCA,NVIRA,NOCCA,IOCA,E2) ^ 0x12b7434 chrec_fold_plus_1 /space/rguenther/src/svn/trunk/gcc/tree-chrec.c:271 0x12b7cea chrec_fold_plus(tree_node*, tree_node*, tree_node*) /space/rguenther/src/svn/trunk/gcc/tree-chrec.c:373 0xcebd7b instantiate_scev_binary /space/rguenther/src/svn/trunk/gcc/tree-scalar-evolution.c:2347 from a quick look instantiate_scev_r for some reason doesn't do its work properly.
Reducing a testcase.
SUBROUTINE UMPSE(AIBJ,NOC,NDIM,NOCA,NVIRA,NOCCA,E2) DIMENSION AIBJ(NOC,NDIM,*) DO 20 MA=1,NVIRA DO 20 MI=1,NOCA DO 10 MB=1,MA MBI = MI+NOCA*(MB-1) DO 10 MJ=1,NOCCA DUM = AIBJ(MJ,MAI,MB)-AIBJ(MJ,MBI,MA) E2A = E2A-DUM 10 CONTINUE 20 CONTINUE E2 = E2+E2A END
Hm, so are we expecting that instantiate_scev_r through static tree instantiate_scev_binary (basic_block instantiate_below, struct loop *evolution_loop, struct loop *inner_loop, tree chrec, enum tree_code code, tree type, tree c0, tree c1, bool fold_conversions, int size_expr) { tree op1; tree op0 = instantiate_scev_r (instantiate_below, evolution_loop, inner_loop, c0, fold_conversions, size_expr); with evolution_loop == 2 for (integer(kind=4)) ((unsigned int) ma_28 + 4294967295) returns {0, +, 1}_1, thus an evolution in loop 1 which is an outer loop of 2? Ah, now that the global cache is in effect it's no longer true that instantiated_below remains the same ... :/
Author: rguenth Date: Fri Sep 20 17:49:45 2013 New Revision: 202790 URL: http://gcc.gnu.org/viewcvs?rev=202790&root=gcc&view=rev Log: 2013-09-20 Richard Biener <rguenther@suse.de> PR middle-end/58484 * tree-scalar-evolution.c (struct scev_info_str): Shrink by remembering SSA name version and block index. (new_scev_info_str): Adjust. (hash_scev_info): Likewise. Also hash the block index. (eq_scev_info): Adjust. (find_var_scev_info): Likewise. (struct instantiate_cache_entry): Remove. (struct instantiate_cache_type): Use a htab to map name, block to chrec. (instantiate_cache_type::~instantiate_cache_type): Adjust. (get_instantiated_value_entry): Likewise. (hash_idx_scev_info, eq_idx_scev_info): New functions. (instantiate_scev_name): Adjust. * gfortran.dg/pr58484.f: New testcase. Added: trunk/gcc/testsuite/gfortran.dg/pr58484.f Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-scalar-evolution.c
Fixed.