From a6ae518ff7855e89b8b1e578e2124fd0a79f3f84 Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Fri, 24 Jan 2014 14:03:19 +0000 Subject: sem_util.adb, [...]: Correct false positive warnings. 2014-01-24 Robert Dewar * sem_util.adb, lib-xref.adb: Correct false positive warnings. From-SVN: r207031 --- gcc/ada/sem_util.adb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/ada/sem_util.adb') diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index b5bb307..422e462 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -9882,7 +9882,12 @@ package body Sem_Util is -- a reference as a modification. It is not clear if there are any -- other bad consequences. ??? - if Present (Etype (N)) and then Is_Access_Type (Etype (N)) then + if No (Etype (N)) then + return False; + + -- We have an Etype set, so we can check it + + elsif Is_Access_Type (Etype (N)) then return False; -- OK, not access type case, so just test whole expression -- cgit v1.1