Hi Tobias, > implied-shape: Used with PARAMETER; takes the shape of the RHS and (F2018, > R824) "implied-shape-spec is assumed-implied-spec, > assumed-implied-spec-list" > > When matching an element in an array spec of this type, i.e. (R821) > "assumed-implied-spec is [lower-bound: ] *", the matcher always returns > AS_ASSUMED_SIZE as – without further knowledge – the two, assumed-size and > implied-shape, are indistinguishable: > > current_type = match_array_element_spec (as); > > When matching the lowest dimension (as->rank = 1), as->type is set to > current_type – for the same reason as above. However, when matching the > second time an element of type "AS_ASSUMED_SIZE", one knows that it cannot > be a valid assumed-size array – but it can be a valid implied-shape > array. Hence, it is turned into the latter: as->type = AS_IMPLIED_SHAPE. > > If we now patch the third, etc. dimension, current_type is still > assumed-size but as->type is now implied-size. Seemingly, the code writer > was confused between assumed-shape and assumed-size … > > Committed as Rev. 279835 after building an regtesting the attached patch.
seems you missed +UNRESOLVED: gfortran.dg/implied_shape_5.f90 -O0 compilation failed to produce executable +UNRESOLVED: gfortran.dg/implied_shape_5.f90 -O1 compilation failed to produce executable +UNRESOLVED: gfortran.dg/implied_shape_5.f90 -O2 compilation failed to produce executable +UNRESOLVED: gfortran.dg/implied_shape_5.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions compilation failed to produce executable +UNRESOLVED: gfortran.dg/implied_shape_5.f90 -O3 -g compilation failed to produce executable +UNRESOLVED: gfortran.dg/implied_shape_5.f90 -Os compilation failed to produce executable The new test is expected to fail compilation everywhere, but is still marked { dg-do run }. Usually a sign of a problem in the regtest procedure: don't check only for (new) FAILs, but compare mail-report.log output before and after the patch. I guess the test should just be marked dg-do compile instead. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University