https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65532
Bug ID: 65532 Summary: [5 Regression] Unexpected error with legacy code (D1MACH) Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gmx dot de Created attachment 35119 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35119&action=edit Bug demo. Dear all, after updating to trunk rev. 221607, I found a problem which I reduced to the attached example. Commenting out the call to d1mach or commenting out in d1mach the data statements in lines 21-25 makes the error messages disappear. Here's the error messages I get: % gfc-trunk -c gfcbug131.f90 gfcbug131.f90:10:23: INTEGER :: diver(4) 1 Error: Different shape for array assignment at (1) on dimension 1 (4 and 2) gfcbug131.f90:8:23: INTEGER :: large(4) 1 Error: Different shape for array assignment at (1) on dimension 1 (4 and 2) gfcbug131.f90:11:23: INTEGER :: LOG10(4) 1 Error: Different shape for array assignment at (1) on dimension 1 (4 and 2) gfcbug131.f90:9:23: INTEGER :: right(4) 1 Error: Different shape for array assignment at (1) on dimension 1 (4 and 2) gfcbug131.f90:7:23: INTEGER :: small(4) 1 Error: Different shape for array assignment at (1) on dimension 1 (4 and 2)