aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Desplanques <desplanques@adacore.com>2025-01-31 10:40:42 +0100
committerEric Botcazou <ebotcazou@adacore.com>2025-06-05 15:39:32 +0200
commit6b1c8f47583c8fb35009b8dead605f623aeb5376 (patch)
tree5f2035c0bcfc6564999e04141179036aefb81a96
parentb7e10f86d5cbd95ac38a1141f3e0a95424ede281 (diff)
downloadgcc-6b1c8f47583c8fb35009b8dead605f623aeb5376.zip
gcc-6b1c8f47583c8fb35009b8dead605f623aeb5376.tar.gz
gcc-6b1c8f47583c8fb35009b8dead605f623aeb5376.tar.bz2
ada: Tweak caching of streaming subprograms
gcc/ada/ChangeLog: * exp_attr.adb (Interunit_Ref_OK): Tweak categorization of compilation units.
-rw-r--r--gcc/ada/exp_attr.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index aea9e8a..4e0052e 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -284,8 +284,8 @@ package body Exp_Attr is
(In_Same_Extended_Unit (Subp_Unit, Attr_Ref_Unit)
-- If subp declared in unit body, then we don't want to refer
-- to it from within unit spec so return False in that case.
- and then not (Body_Required (Attr_Ref_Unit)
- and not Body_Required (Subp_Unit)));
+ and then not (not Is_Body (Unit (Attr_Ref_Unit))
+ and Is_Body (Unit (Subp_Unit))));
-- Returns True if it is ok to refer to a cached subprogram declared in
-- Subp_Unit from the point of an attribute reference occurring in
-- Attr_Ref_Unit. Both arguments are usually N_Compilation_Nodes,