Message ID | 51548343.UWF2luzvAI@polaris |
---|---|
State | New |
Headers | show |
Index: gcc-interface/utils.c =================================================================== --- gcc-interface/utils.c (revision 248051) +++ gcc-interface/utils.c (working copy) @@ -5431,11 +5431,16 @@ can_materialize_object_renaming_p (Node_ { while (true) { + expr = Original_Node (expr); + switch Nkind (expr) { case N_Identifier: case N_Expanded_Name: - return true; + if (!Present (Renamed_Object (Entity (expr)))) + return true; + expr = Renamed_Object (Entity (expr)); + break; case N_Selected_Component: {