]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/testsuite/gcc.dg/maxof-compile.c: Add tests using qualifiers
authorAlejandro Colomar <alx@kernel.org>
Wed, 21 Jan 2026 01:35:58 +0000 (02:35 +0100)
committerAlejandro Colomar <alx@kernel.org>
Thu, 22 Jan 2026 01:58:02 +0000 (02:58 +0100)
Reported-by: Joseph Myers <josmyers@redhat.com>
Message-ID: <20260120223726.92382356D0A@www.open-std.org>
Approved-by: Joseph Myers <josmyers@redhat.com>
Message-ID: <8c472204-b58e-372f-7a1f-385b80c43c47@redhat.com>

gcc/testsuite/ChangeLog:

* gcc.dg/maxof-compile.c (quals): New test.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
gcc/testsuite/gcc.dg/maxof-compile.c

index 098cade1426f6982aa41ab34cc70249551895963..9ba5783fe4a90b936ae6ec1ebd6a878f68fb6883 100644 (file)
@@ -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);
+}