https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84135
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-invalid-code |ice-on-valid-code CC| |burnus at gcc dot gnu.org --- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Thomas Koenig from comment #6) > > integer, dimension(3) :: x[2,*] > This should be caught, there is no normal dimension > here, just a codimension. I disagree: "dimension(3)" is a normal dimension … The problem is that: dimension(3) :: x[2,*] in gfc_trans_array_cobounds leads to as->upper = {3, 2, 2} but it should be: as->upper = {3, 2, NULL} (ubound for dim=2 is (rightly!) a NULL_TREE and, hence, the ICE occurs.) Side remark: The following variant also crashes: integer, dimension(3) :: x[2,*] = [1,2,3]