[gcc r16-9370] testsuite: prevent packing enum in vect-early-break_65.c [PR124112]

Torbjorn Svensson via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:47635b3cbf0fc55dde4672b2e267c313fba486ae

commit r16-9370-g47635b3cbf0fc55dde4672b2e267c313fba486ae
Author: Torbjörn SVENSSON <[email protected]>
Date:   Mon Jul 20 21:31:59 2026 +0200

    testsuite: prevent packing enum in vect-early-break_65.c [PR124112]
    
    GCC might be compiled with -fshort-enum enabled by default.
    For those targets, it is important that the enum type is not packed into
    something smaller than int, or vectorization will not match.
    
    gcc/testsuite/ChangeLog:
    
            PR testsuite/124112
            * gcc.dg/vect/vect-early-break_65.c: Prevent packing enum to a
            smaller object.
    
    Signed-off-by: Torbjörn SVENSSON <[email protected]>
    (cherry picked from commit 7aa3a196148f8b35619f38020164d15e1eace7fb)

Diff:
---
 gcc/testsuite/gcc.dg/vect/vect-early-break_65.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
index 8763a5ff04ec..366922b9dbab 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
@@ -4,7 +4,7 @@
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-Ofast -fno-vect-cost-model -fdump-tree-vect-details" } */
 
-enum a { b };
+enum a { b, dummy = __INT_MAX__ };
 
 struct {
   enum a c;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.