https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89363
Bug ID: 89363 Summary: RANK incorrect for unallocated allocatable Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: Bader at lrz dot de Target Milestone: --- Created attachment 45732 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45732&action=edit test code The attached program compiles without complaints using gfortran 9.0 trunk build, but delivers an incorrect value for the RANK() intrinsic if the dummy is declared with assumed RANK and the ALLOCATABLE attribute, and the actual argument has the status "not allocated". Instead of "2", values are returned that change from run to run.