diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-23 14:27:02 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-23 14:27:02 +0100 |
commit | bfaf8a97808c691ae311a55cfa0e930e92ee65a3 (patch) | |
tree | 6cf0bfb149e1f6e7f829e54bd7462da4ed3a4229 /gcc/ada/sem_ch4.adb | |
parent | 9313a26a9ad02e45a1b75d9274f5025015356669 (diff) | |
download | gcc-bfaf8a97808c691ae311a55cfa0e930e92ee65a3.zip gcc-bfaf8a97808c691ae311a55cfa0e930e92ee65a3.tar.gz gcc-bfaf8a97808c691ae311a55cfa0e930e92ee65a3.tar.bz2 |
[multiple changes]
2017-01-23 Yannick Moy <moy@adacore.com>
* sem_ch4.adb (Analyze_Indexed_Component_Form):
Adapt to inlined prefix with string literal subtype.
* inline.adb (Expand_Inlined_Call): Keep unchecked
conversion inside inlined call when formal type is constrained.
2017-01-23 Javier Miranda <miranda@adacore.com>
* sem_util.adb (New_Copy_Tree): Code cleanup:
removal of global variables. All the global variables, global
functions and tables of this subprogram are now declared locally.
From-SVN: r244807
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r-- | gcc/ada/sem_ch4.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index ef4206b..50fe00c 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -2407,7 +2407,13 @@ package body Sem_Ch4 is end if; if Is_Array_Type (Array_Type) then - null; + + -- In order to correctly access First_Index component later, + -- replace string literal subtype by its parent type. + + if Ekind (Array_Type) = E_String_Literal_Subtype then + Array_Type := Etype (Array_Type); + end if; elsif Present (Pent) and then Ekind (Pent) = E_Entry_Family then Analyze (Exp); |