https://gcc.gnu.org/g:8498a886900c4b95bae132c2d3da8862fa674dba

commit r16-6968-g8498a886900c4b95bae132c2d3da8862fa674dba
Author: Alejandro Colomar <[email protected]>
Date:   Wed Jan 21 02:35:58 2026 +0100

    gcc/testsuite/gcc.dg/maxof-compile.c: Add tests using qualifiers
    
    Reported-by: Joseph Myers <[email protected]>
    Message-ID: <[email protected]>
    Approved-by: Joseph Myers <[email protected]>
    Message-ID: <[email protected]>
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/maxof-compile.c (quals): New test.
    
    Signed-off-by: Alejandro Colomar <[email protected]>

Diff:
---
 gcc/testsuite/gcc.dg/maxof-compile.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/maxof-compile.c 
b/gcc/testsuite/gcc.dg/maxof-compile.c
index 098cade1426f..9ba5783fe4a9 100644
--- a/gcc/testsuite/gcc.dg/maxof-compile.c
+++ b/gcc/testsuite/gcc.dg/maxof-compile.c
@@ -156,3 +156,12 @@ type (void)
   _Generic (_Maxof (bool), bool: 0);
   _Generic (_Minof (bool), bool: 0);
 }
+
+void
+quals (void)
+{
+  _Generic (typeof (_Maxof (const int)), int: 0);
+  _Generic (typeof (_Minof (const int)), int: 0);
+  _Generic (typeof (_Maxof (volatile int)), int: 0);
+  _Generic (typeof (_Minof (volatile int)), int: 0);
+}

Reply via email to