summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index efefdb82068..400b162cd60 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -2184,9 +2184,12 @@ package body Sem_Attr is
if Is_Entity_Name (P) and then Is_Type (Entity (P)) then
-- If we are within an instance, the attribute must be legal
- -- because it was valid in the generic unit.
+ -- because it was valid in the generic unit. Ditto if this is
+ -- an inlining of a function declared in an instance.
- if In_Instance then
+ if In_Instance
+ or else In_Inlined_Body
+ then
return;
-- For sure OK if we have a real private type itself, but must