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

            Bug ID: 122836
           Summary: ICE: in reshape_init_r, at cp/decl.cc
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 522024330006 at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://godbolt.org/z/froWzaxEa

Program:
```c
#include <mmintrin.h>
#include <xmmintrin.h>

typedef struct V {
    __attribute__((__vector_size__(8))) float vfloats[2];
} V;

int main() {
    __m64 m2 = *(__m64*) &(V){ { .vfloats={0, 0}} } 
    return 0;
}
```
Part of the traceback:
4540.fuzz:36:58: internal compiler error: in reshape_init_r, at cp/decl.cc:7596
0x5da1dc8 internal_error(char const*, ...)
        /workspace/install/gcc/src/gcc/gcc/diagnostic-global-context.cc:517
0x5d3f858 fancy_abort(char const*, int, char const*)
        /workspace/install/gcc/src/gcc/gcc/diagnostic.cc:1749
0x10a7f0a reshape_init_r
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7596
0x10a4300 reshape_init_array_1
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7024
0x10a4b69 reshape_init_array
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7095
0x10a821b reshape_init_r
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7625
0x10a8993 reshape_init(tree_node*, tree_node*, int)
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7710
0x10a803c reshape_init_r
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7609
0x10a5dfc reshape_init_class
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7323
0x10a81bb reshape_init_r
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7623
0x10a8993 reshape_init(tree_node*, tree_node*, int)
        /workspace/install/gcc/src/gcc/gcc/cp/decl.cc:7710
0x15cfbea finish_compound_literal(tree_node*, tree_node*, int, fcl_t)
        /workspace/install/gcc/src/gcc/gcc/cp/semantics.cc:3890
0x137262a cp_parser_postfix_expression
        /workspace/install/gcc/src/gcc/gcc/cp/parser.cc:8229
0x137a2ce cp_parser_unary_expression
        /workspace/install/gcc/src/gcc/gcc/cp/parser.cc:9735
0x137cf99 cp_parser_cast_expression
        /workspace/install/gcc/src/gcc/gcc/cp/parser.cc:10650
0x1379b44 cp_parser_unary_expression
        /workspace/install/gcc/src/gcc/gcc/cp/parser.cc:9652
0x137cf99 cp_parser_cast_expression
        /workspace/install/gcc/src/gcc/gcc/cp/parser.cc:10650
0x137cb25 cp_parser_cast_expression
        /workspace/install/gcc/src/gcc/gcc/cp/parser.cc:10603
0x137d167 cp_parser_binary_expression
        /workspace/install/gcc/src/gcc/gcc/cp/parser.cc:10753
0x137f132 cp_parser_assignment_expression
        /workspace/install/gcc/src/gcc/gcc/cp/parser.cc:11098
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.

The gcc version I used is:

Using built-in specs.
COLLECT_GCC=/workspace/install/gcc/install_15.2.0/bin/gcc
COLLECT_LTO_WRAPPER=/workspace/install/gcc/install_15.2.0/libexec/gcc/x86_64-pc-linux-gnu/15.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /workspace/install/gcc/src/gcc/configure --enable-coverage
--enable-checking --disable-multilib --disable-shared --disable-bootstrap
--enable-languages=c,c++ --prefix=/workspace/install/gcc/install_15.2.0
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.2.0 (GCC)

Reply via email to