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

            Bug ID: 122238
           Summary: ICE: 'verify_gimple' failed
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: qingren2hxb at gmail dot com
  Target Milestone: ---

Created attachment 62534
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62534&action=edit
bug report by using -freport-bug

*******************************************************************************
# gcc -v
Using built-in specs.
COLLECT_GCC=/workspace/installation/bin/gcc
COLLECT_LTO_WRAPPER=/workspace/installation/libexec/gcc/x86_64-pc-linux-gnu/15.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /workspace/gcc/configure --prefix=/workspace/installation
--enable-coverage --enable-checking --disable-multilib --disable-shared
--disable-bootstrap --enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.1.0 (GCC)
*******************************************************************************
$ g++ -
union U
{
  char *x = &y;
  char y;
};

constexpr U u = {};

#pragma omp distribute parallel for reduction(+:u.x[1:2])
void test() {
  for (int i = 0; i < 10; ++i) {
    u.x[1] += i;  
  }
}

*******************************************************************************
test.C: In function 'void test()':
test.C:10:6: error: address taken but 'TREE_ADDRESSABLE' bit not set
   10 | void test() {
      |      ^~~~
_1 = &u.y;
test.C:10:6: error: address taken but 'TREE_ADDRESSABLE' bit not set
_7 = &u.y;
test.C:10:6: internal compiler error: 'verify_gimple' failed
0x5d4e2e6 internal_error(char const*, ...)
        /workspace/gcc/gcc/diagnostic-global-context.cc:517
0x27b5f72 verify_gimple_in_seq(gimple*, bool)
        /workspace/gcc/gcc/tree-cfg.cc:5332
0x1f81368 gimplify_body(tree_node*, bool)
        /workspace/gcc/gcc/gimplify.cc:20916
0x1f81cdb gimplify_function_tree(tree_node*)
        /workspace/gcc/gcc/gimplify.cc:21042
0x1a869c9 cgraph_node::analyze()
        /workspace/gcc/gcc/cgraphunit.cc:689
0x1a8aa9e analyze_functions
        /workspace/gcc/gcc/cgraphunit.cc:1265
0x1a90e91 symbol_table::finalize_compilation_unit()
        /workspace/gcc/gcc/cgraphunit.cc:2574
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to