diff options
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r-- | gcc/ada/sem_util.adb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 9f43f2f7315..4876303f0a0 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -6802,6 +6802,11 @@ package body Sem_Util is and then Present (Etype (Orig_Node)) and then Is_Access_Type (Etype (Orig_Node)) then + -- Note that if the prefix is an explicit dereference that does not + -- come from source, we must check for a rewritten function call in + -- prefixed notation before other forms of rewriting, to prevent a + -- compiler crash. + return (Nkind (Orig_Node) = N_Function_Call and then not Is_Access_Constant (Etype (Prefix (N)))) |