projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
861b78a
)
[Ada] Fix internal error on mix of controlled and protected types
author
Eric Botcazou
<ebotcazou@adacore.com>
Thu, 10 Mar 2022 10:11:32 +0000
(11:11 +0100)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Mon, 16 May 2022 08:42:03 +0000
(08:42 +0000)
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.
gcc/ada/inline.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/inline.adb
b/gcc/ada/inline.adb
index
5944aed
..
a1d2254
100644
(file)
--- 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