This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/85176] ICE in force_decl_die, at dwarf2out.c:25910
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Apr 2018 09:33:09 +0000
- Subject: [Bug debug/85176] ICE in force_decl_die, at dwarf2out.c:25910
- Auto-submitted: auto-generated
- References: <bug-85176-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85176
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Hmmm, reduced with missing return value:
$ cat ice.ii
namespace a {
class b &operator<<(b &, char *) {}
extern b c;
} // namespace a
main() { a::c << ""; }
$ g++ -O1 -flto -g1 ice.ii
ice.ii: In function ‘a::b& a::operator<<(a::b&, char*)’:
ice.ii:2:35: warning: no return statement in function returning non-void
[-Wreturn-type]
class b &operator<<(b &, char *) {}
^
ice.ii: At global scope:
ice.ii:5:6: warning: ISO C++ forbids declaration of ‘main’ with no type
[-Wreturn-type]
main() { a::c << ""; }
^
ice.ii: In function ‘int main()’:
ice.ii:5:18: warning: ISO C++ forbids converting a string constant to ‘char*’
[-Wwrite-strings]
main() { a::c << ""; }
^~
lto1: internal compiler error: in force_decl_die, at dwarf2out.c:25910
0x858808 force_decl_die
../../gcc/dwarf2out.c:25910
0x8596c7 flush_limbo_die_list
../../gcc/dwarf2out.c:30951
0x8663c5 dwarf2out_finish
../../gcc/dwarf2out.c:30991
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.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
That started with my r254437. Let me isolate also a test-case without the
warning.