Copying a node does not automatically propagate its associated dimension
information (if any). This must be done explicitly.
gcc/ada/
* sem_util.adb (Copy_Node_With_Replacement): Add call to
Copy_Dimensions so that any dimension information associated with
the copied node is also associated with the resulting copy.
with Sem_Ch6; use Sem_Ch6;
with Sem_Ch8; use Sem_Ch8;
with Sem_Ch13; use Sem_Ch13;
+with Sem_Dim; use Sem_Dim;
with Sem_Disp; use Sem_Disp;
with Sem_Elab; use Sem_Elab;
with Sem_Eval; use Sem_Eval;
Set_Chars (Result, Chars (Entity (Result)));
end if;
end if;
+
+ Copy_Dimensions (From => N, To => Result);
end if;
return Result;