https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51260
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #3 from kargl at gcc dot gnu.org --- (In reply to Thomas Koenig from comment #2) > Still the same thing with current trunk. > > Interestingly, > > integer, parameter:: is(10000)=(/(i,i=1,10000)/) > integer, parameter :: x = is(1) > print *,x > end > > is simplified correctly. > > Maybe a missing call to gfc_simplify_expr somewhere... Still what? gfc -o z a.f90 -fdump-tree-original && ./z 1 laptop-kargl:kargl[231] more a.f90.003t.original MAIN__ () { integer(kind=4) i; { struct __st_parameter_dt dt_parm.0; dt_parm.0.common.filename = &"a.f90"[1]{lb: 1 sz: 1}; dt_parm.0.common.line = 3; dt_parm.0.common.flags = 128; dt_parm.0.common.unit = 6; _gfortran_st_write (&dt_parm.0); { static integer(kind=4) C.3677 = 1; _gfortran_transfer_integer_write (&dt_parm.0, &C.3677, 4); } _gfortran_st_write_done (&dt_parm.0); } }