http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57803
Bug ID: 57803 Summary: Waste work in gfc_build_dummy_array_decl() Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: pchang9 at cs dot wisc.edu CC: nistor1 at illinois dot edu The problem appears in revision 200588 in version 4.9. In method "gfc_build_dummy_array_decl()" in gcc/fortran/trans-decl.c, the loop on line 978 should break immediately after "packed" is set to "PACKED_PARTIAL". All the iterations after "packed" set to "PACKED_PARTIAL" do not perform any useful work, at best they just set "packed" again to "PACKED_PARTIAL".