summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_attr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_attr.adb')
-rw-r--r--gcc/ada/exp_attr.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index d1908bd04f9..60a975fe049 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -6884,7 +6884,8 @@ package body Exp_Attr is
-- are any non-valid scalar subcomponents, and call the function.
elsif Is_Record_Type (Ftyp)
- and then Nkind (Type_Definition (Declaration_Node (Ftyp))) =
+ and then Present (Declaration_Node (Ftyp))
+ and then Nkind (Type_Definition (Declaration_Node (Ftyp))) =
N_Record_Definition
then
Rewrite (N,