NinaRanns / gcc

GNU General Public License v2.0
0 stars 0 forks source link

[trunk] ICE in gen_inlined_subroutine_die, at dwarf2out.cc:25152 #18

Open NinaRanns opened 2 weeks ago

NinaRanns commented 2 weeks ago

https://godbolt.org/z/9ajTMY368

int f(int& i)
{
   i++;
   return i;
}

int f2 (int x, const int *y) pre(x > 0)
{
    int b = x + *y;
}

int main(int ac, char *av[])
{
   int i = 3;
   ++i;
   *av[0] = (char) f(i);
   //__builtin_observable ();
   contract_assert (f2(i, &i) > 42);
  return i;
} 
<source>: In function 'int f2(int, const int*)':
<source>:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
   10 | }
      | ^
during RTL pass: final
dump file: /app/output.cpp.359r.final
<source>:10:1: internal compiler error: in gen_inlined_subroutine_die, at dwarf2out.cc:25152
0x2805185 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t)
    ???:0
0x2818865 internal_error(char const*, ...)
    ???:0
0xa87ede fancy_abort(char const*, int, char const*)
    ???:0
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.
Compiler returned: 1
NinaRanns commented 1 week ago

reproducible on trunk https://godbolt.org/z/b3rc59vd1