aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 12d6426..0c2cb2c 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -534,7 +534,11 @@ package body Sem_Ch5 is
if In_Inlined_Body then
null;
- elsif not Is_Variable (Lhs) then
+ elsif not Is_Variable (Lhs)
+ and then not (not Comes_From_Source (Lhs)
+ and then Nkind (Lhs) in N_Has_Etype
+ and then Needs_Construction (Etype (Lhs)))
+ then
-- Ada 2005 (AI-327): Check assignment to the attribute Priority of a
-- protected object.