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

            Bug ID: 97129
           Summary: [11 Regression] ICE in maybe_record_trace_start, at
                    dwarf2cfi.c:2405
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200913 snapshot (g:2fd157813c4964033e156ccb7df8889cd2afee99)
ICEs when compiling the following testcase w/ -O2 -fwrapv
-fno-omit-frame-pointer:

void
s5 (void);

void
rp (int, int, int, int, int, int, int);

void
yv (int kh)
{
  if (kh)
    return;

  while (kh >= 0)
    {
      s5 ();
      ++kh;
    }
}

int __attribute__ ((naked))
p7 (int q3)
{
  yv (q3);
  rp (0, 0, 0, 0, 0, 0, 0);

  return 0;
}

% gcc-11.0.0 -O2 -fwrapv -fno-omit-frame-pointer -c glywli2q.c
during RTL pass: dwarf2
glywli2q.c: In function 'p7':
glywli2q.c:27:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.c:2405
   27 | }
      | ^
0x6197f4 maybe_record_trace_start
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200913/work/gcc-11-20200913/gcc/dwarf2cfi.c:2405
0x99ccdd scan_trace
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200913/work/gcc-11-20200913/gcc/dwarf2cfi.c:2605
0x99d4fc create_cfi_notes
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200913/work/gcc-11-20200913/gcc/dwarf2cfi.c:2758
0x99d4fc execute_dwarf2_frame
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200913/work/gcc-11-20200913/gcc/dwarf2cfi.c:3122
0x99d4fc execute
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200913/work/gcc-11-20200913/gcc/dwarf2cfi.c:3610

Inconsistent CFI state!
SHOULD have:
        .cfi_def_cfa 7, 8
        .cfi_offset 16, -8
DO have:
        .cfi_def_cfa 7, 24
        .cfi_offset 16, -8

Reply via email to