https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86593
Bug ID: 86593
Summary: [8.0 Regression] internal compiler error: in
based_loc_descr, at dwarf2out.c:14272
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: manisandro at gmail dot com
Target Milestone: ---
Following is reproducible using mingw64-gcc-8.1.0-2.fc29 [1] on Fedora Rawhide,
and only when compiling for x86_64-w64-mingw32 (and not i686-w64-mingw32).
I could also reproduce it with gcc-8.2.0-RC-20180719.tar.xz built for mingw64.
I could not reproduce it with native gcc.
The issue also did not appear with mingw64-gcc-7.2.0-1.fc28.x86_64
[1] https://koji.fedoraproject.org/koji/buildinfo?buildID=1114148
This program:
----
struct Foo
{
int bar(int a, int b, int c, int d);
};
int Foo::bar(int a, int b, int c, int d)
{
return 0;
}
----
compiled as
x86_64-w64-mingw32-g++ -O -g -fno-omit-frame-pointer -o test.o -c test.cpp
produces:
----
during RTL pass: final
test.cpp: In member function 'int Foo::bar(int, int, int, int)':
test.cpp:9:1: internal compiler error: in based_loc_descr, at dwarf2out.c:14272
}
^
----
All three of "-O -g -fno-omit-frame-pointer" are needed to reproduce the crash.