------- Comment #6 from fxcoudert at gcc dot gnu dot org 2007-09-03 11:31 ------- (In reply to comment #4) > Seemingly, the array range x0(n0-1:1:-1) does not get properly simplified and > thus ->value.real points to the nirvana.
Nope. I get an ICE for the following testcase: real, parameter :: x0(1) = 0 real, parameter :: x(1) = (/ x0 /) + 1 end The problem is that we come into gfc_arith_plus() with one operand being an EXPR_ARRAY, so looking at its value.real is wrong (if you want to do something with it, it's value.constructor that should be looked at). I guess reduce_binary_ac() should really look deeper: in the loop "for (c = head; c; c = c->next)", we should see whether c->expr is an EXPR_CONSTANT before calling eval(), and look deeper into it if it's an EXPR_ARRAY. (Though it's the first time I look at this code and array constructors, I might be misunderstanding it all.) -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fxcoudert at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33288