https://gcc.gnu.org/g:173934882f0d04edb87c5b86e724dd869669ba08

commit r16-8996-g173934882f0d04edb87c5b86e724dd869669ba08
Author: Steve Baird <[email protected]>
Date:   Mon Feb 9 14:05:51 2026 -0800

    ada: Put_Image attribute_definition_clause incorrectly ignored.
    
    If a scalar type's Put_Image aspect is specified via an
    attribute_definition_clause (as opposed to using aspect_specification
    syntax), the aspect specification was incorrectly ignored.
    
    gcc/ada/ChangeLog:
    
            * aspects.adb (Has_Aspect): In the call to Find_Aspect, pass in
            True for the Or_Rep_Item parameter instead of letting it default
            to False.

Diff:
---
 gcc/ada/aspects.adb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/aspects.adb b/gcc/ada/aspects.adb
index 8dd9dd9a6e4f..3e171e24d559 100644
--- a/gcc/ada/aspects.adb
+++ b/gcc/ada/aspects.adb
@@ -297,7 +297,9 @@ package body Aspects is
       Class_Present : Boolean := False) return Boolean
    is
    begin
-      return Present (Find_Aspect (Id, A, Class_Present => Class_Present));
+      return Present
+              (Find_Aspect
+                (Id, A, Class_Present => Class_Present, Or_Rep_Item => True));
    end Has_Aspect;
 
    function Has_Aspects (N : Node_Id) return Boolean

Reply via email to