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

            Bug ID: 101607
           Summary: ICE on compilable code: in assign_stack_temp_for_type,
                    at function.c:798
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210723 (experimental) [master revision
:3eeaf64a5:01ac2f08b0105a1c85425d0e59216eb528c6d2ab] (GCC)

$ cat mutant.c
union {
  struct {
    struct {
      struct {
        struct {
          struct {
            struct {
              struct {
                struct {
                  struct {
                    struct {
                      struct {
                        struct {
                          struct {
                            struct {
                              struct {
                                struct {
                                  struct {
                                    struct {
                                      struct {
                                        struct {
                                          struct {
                                            struct {
                                              struct {
                                                struct {
                                                  struct {
                                                    struct {
                                                      struct {
                                                        int u2s_a, u2s_b,
u2s_c,
                                                            u2s_d, u2s_e
                                                      } u2s_a, u2s_b, u2s_c,
                                                          u2s_d, u2s_e
                                                    } u2s_a, u2s_b, u2s_c,
                                                        u2s_d, u2s_e
                                                  } u2s_a, u2s_b, u2s_c, u2s_d,
                                                      u2s_e
                                                } u2s_a, u2s_b, u2s_c, u2s_d,
                                                    u2s_e
                                              } u2s_a, u2s_b, u2s_c, u2s_d,
                                                  u2s_e
                                            } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                                          } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                                        } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                                      } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                                    } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                                  } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                                } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                              } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                            } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                          } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                        } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                      } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                    } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                  } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
                } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
              } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
            } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
          } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
        } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
      } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
    } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e
  }
} fu2();
unions() { fu2(); }

$ gcc-trunk -w mutant.c
during RTL pass: expand
mutant.c: In function ‘unions’:
mutant.c:64:12: internal compiler error: in assign_stack_temp_for_type, at
function.c:798
   64 | unions() { fu2(); }
      |            ^~~~~
0x6d9257 assign_stack_temp_for_type(machine_mode, poly_int<1u, long>,
tree_node*)
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/function.c:798
0xbf47bb assign_temp(tree_node*, int, int)
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/function.c:1018
0xa449ff expand_call(tree_node*, rtx_def*, int)
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/calls.c:3882
0xb82f85 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/expr.c:11443
0xa5d5bf expand_expr
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/expr.h:301
0xa5d5bf expand_call_stmt
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cfgexpand.c:2846
0xa5d5bf expand_gimple_stmt_1
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cfgexpand.c:3879
0xa5d5bf expand_gimple_stmt
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cfgexpand.c:4043
0xa62ec9 expand_gimple_basic_block
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cfgexpand.c:6085
0xa64d9f execute
        /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cfgexpand.c:6811
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to