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

            Bug ID: 103451
           Summary: crash at gcc/range-op.cc:1836
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

int func_10_ptr_12;

void func_10(long li_8) 
{
  long *ptr_9 = &li_8;
  li_8 &= *ptr_9 / 0 ?: li_8;
  for (;;)
    func_10_ptr_12 &= 4 ? *ptr_9 : 4;
}

void func_9_s_8() 
{ 
  func_10(func_9_s_8); 
}

on recent gcc, does this:

$ /home/dcb/gcc/results/bin/gcc -c -O2 bug775.c
during IPA pass: inline
bug775.c: At top level:
bug775.c:14:1: internal compiler error: Segmentation fault
   14 | }
      | ^
0xdabcb9 crash_signal(int)
        ../../trunk.git/gcc/toplev.c:322
0x1c98f2f operator_div::wi_fold(irange&, tree_node*,
generic_wide_int<wide_int_storage> const&, generic_wide_int<wide_int_storage>
const&, generic_wide_int<wide_int_storage> const&,
generic_wide_int<wide_int_storage> const&) const
        ../../trunk.git/gcc/range-op.cc:1836

The bug first seems to occur sometime between git hash 415f9ee404dc9e8a
and 4a2007594cff78fb, a distance of 22 commits.

Reply via email to