aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-03-10 11:11:32 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-16 08:42:03 +0000
commit146ea83af978384b0f7dabc8176f8bf98892ce2a (patch)
tree5a5fe699575267d9b086912acab8bb0f16a81bbf /gcc/ada
parent861b78a946b0d0936baed97fb17fe3c7b300a8c5 (diff)
downloadgcc-146ea83af978384b0f7dabc8176f8bf98892ce2a.zip
gcc-146ea83af978384b0f7dabc8176f8bf98892ce2a.tar.gz
gcc-146ea83af978384b0f7dabc8176f8bf98892ce2a.tar.bz2
[Ada] Fix internal error on mix of controlled and protected types
The key is that the protected type is a (limited) private type, which fools a test in Cleanup_Scopes. gcc/ada/ * inline.adb (Cleanup_Scopes): Test the underlying type.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/inline.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index 5944aed..a1d2254 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -2773,7 +2773,7 @@ package body Inline is
Scop := Protected_Body_Subprogram (Scop);
elsif Is_Subprogram (Scop)
- and then Is_Protected_Type (Scope (Scop))
+ and then Is_Protected_Type (Underlying_Type (Scope (Scop)))
and then Present (Protected_Body_Subprogram (Scop))
then
-- If a protected operation contains an instance, its cleanup