aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-01-13 12:53:21 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-05-05 04:19:04 -0400
commit43f69ac8b2d08a18497e124422cbb6031539421c (patch)
tree32191d63e2a8c6e97aa02f574cf8c08ab2cd5b5c
parent7faaabcc4813dcee031ca1c9a0810673a31a153b (diff)
downloadgcc-43f69ac8b2d08a18497e124422cbb6031539421c.zip
gcc-43f69ac8b2d08a18497e124422cbb6031539421c.tar.gz
gcc-43f69ac8b2d08a18497e124422cbb6031539421c.tar.bz2
[Ada] Detect unchecked union components with fully qualified names
gcc/ada/ * exp_ch4.adb (Component_Is_Unconstrained_UU): Detect both qualified and unqualified names of unchecked union components.
-rw-r--r--gcc/ada/exp_ch4.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index ca23727..e8fa5a8 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -8154,7 +8154,7 @@ package body Exp_Ch4 is
-- Unconstrained nominal type. In the case of a constraint
-- present, the node kind would have been N_Subtype_Indication.
- if Nkind (Sindic) = N_Identifier then
+ if Nkind (Sindic) in N_Expanded_Name | N_Identifier then
return Is_Unchecked_Union (Base_Type (Etype (Sindic)));
end if;