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

            Bug ID: 102271
           Summary: [12 Regression] ICE in make_decl_rtl, at varasm.c:1446
                    since r12-3433-ga25e0b5e6ac8a77a
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: qing.zhao at oracle dot com
  Target Milestone: ---

Since the revision, the following fails:

$ cat lambda.C
struct A {};

int main() {
  A a;
  auto lam4 = [a] {};
  lam4();
}

$ g++ lambda.C -ftrivial-auto-var-init=pattern -c
during RTL pass: expand
lambda.C: In lambda function:
lambda.C:5:17: internal compiler error: in make_decl_rtl, at varasm.c:1446
    5 |   auto lam4 = [a] {};
      |                 ^
0x1d73737 make_decl_rtl(tree_node*)
        /home/marxin/Programming/gcc/gcc/varasm.c:1446
0x12fe256 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:10547
0x12f5b2c expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:8733
0x12d16aa expand_expr
        /home/marxin/Programming/gcc/gcc/expr.h:301
0x12f49ed expand_expr_addr_expr_1
        /home/marxin/Programming/gcc/gcc/expr.c:8424
0x12f5432 expand_expr_addr_expr
        /home/marxin/Programming/gcc/gcc/expr.c:8545
0x1304a76 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:11761
0x12f5b2c expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:8733
0x12d16aa expand_expr
        /home/marxin/Programming/gcc/gcc/expr.h:301
0x1300257 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:10907
0x12f5b2c expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:8733
0x12d16aa expand_expr
        /home/marxin/Programming/gcc/gcc/expr.h:301
0x12e80a5 expand_assignment(tree_node*, tree_node*, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:5752
0x11217f7 expand_gimple_stmt_1
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:3942
0x1121c34 expand_gimple_stmt
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:4040
0x112a625 expand_gimple_basic_block
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:6082
0x112cec5 execute
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:6808
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