https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69739
--- Comment #4 from Harald Anlauf <anlauf at gmx dot de> --- (In reply to Harald Anlauf from comment #3) > (In reply to John from comment #2) > > So maybe the automatic-size result is the actual root of the ICE? > > If I use > > real :: operate(1:size(A)) > > instead of > > real :: operate(1:PRODUCT(UBOUND(A))) > > I do not get an ICE. So it's not automatic-size per se. More testing: both real :: operate(1:UBOUND(A,1)*UBOUND(A,2)*UBOUND(A,3)) and real :: operate(1:PRODUCT(shape (A))) appear ok.