https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121032

            Bug ID: 121032
           Summary: ICE on x86_64-linux-gnu: 'verify_gimple' failed during
                    GIMPLE pass: lower with vector_size and amp
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jiangchangwu at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://gcc.godbolt.org/z/Tb3d4ccje

*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/home/software/gcc-trunk --enable-coverage
--disable-werror --enable-checking=yes
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20250613 (experimental) (GCC)

*******************************************************************************
Program:
$ cat mutant.c
void a() {
  register
      __attribute__((__vector_size__(4 * sizeof(float)))) float b asm("xmm4");
#pragma omp parallel for
  for (int c = 0; c < 4; c++)
    c < b[c];
}

*******************************************************************************
Command Lines:
$ gcc -fopenmp mutant.c
mutant.c: In function 'a':
mutant.c:6:10: error: 'var_decl' as base where non-register is required
    6 |     c < b[c];
      |         ~^~~
b

D.3109 = VIEW_CONVERT_EXPR<float[4]>(b)[c];
during GIMPLE pass: lower
mutant.c:6:10: internal compiler error: 'verify_gimple' failed
0x5554b38 internal_error(char const*, ...)
        ../../gcc/gcc/diagnostic-global-context.cc:517
0x221044e verify_gimple_in_seq(gimple*, bool)
        ../../gcc/gcc/tree-cfg.cc:5350
0x1e90b55 execute_function_todo
        ../../gcc/gcc/passes.cc:2105
0x1e8e9f8 do_per_function
        ../../gcc/gcc/passes.cc:1703
0x1e90f6b execute_todo
        ../../gcc/gcc/passes.cc:2155
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

While clang-20 get this output:
$ clang-20 -fopenmp -c mutant.c
mutant.c:6:7: warning: relational comparison result unused
[-Wunused-comparison]
    6 |     c < b[c];
      |     ~~^~~~~~
1 warning generated
Compiler Explorer: https://gcc.godbolt.org/z/n6fKfha5T
  • [Bug middle-end/121032] ... jiangchangwu at smail dot nju.edu.cn via Gcc-bugs

Reply via email to