[gcc r15-9773] ada: Tweak caching of streaming subprograms
Eric Botcazou
ebotcazou@gcc.gnu.org
Thu Jun 5 13:40:14 GMT 2025
https://gcc.gnu.org/g:6b1c8f47583c8fb35009b8dead605f623aeb5376
commit r15-9773-g6b1c8f47583c8fb35009b8dead605f623aeb5376
Author: Ronan Desplanques <desplanques@adacore.com>
Date: Fri Jan 31 10:40:42 2025 +0100
ada: Tweak caching of streaming subprograms
gcc/ada/ChangeLog:
* exp_attr.adb (Interunit_Ref_OK): Tweak categorization of compilation
units.
Diff:
---
gcc/ada/exp_attr.adb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index aea9e8ad3afd..4e0052e9ee41 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,
More information about the Gcc-cvs
mailing list