This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/42762] ICE in get_resolution() when compiling a C++ program with -flto -fuse-linker-plugin
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Feb 2010 11:36:35 -0000
- Subject: [Bug lto/42762] ICE in get_resolution() when compiling a C++ program with -flto -fuse-linker-plugin
- References: <bug-42762-16926@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2010-02-05 11:36 -------
DECL_FUNCTION_PERSONALITY is set here because we see an EH tree at some point
that might need the C++ personality routine.
Note that only eh-cleanup removes this empty EH region, so at -O0 we'd see
DECL_FUNCTION_PERSONALITY in the LTO stream but the object files generated
during compiling would still not refer to it (we run eh-cleanup before
expansion when not optimizing). Thus there will be an inconsistency between
what gold sees during symbol resolution and what GCC sees at LTO bytecode
read time (as they see different optimized variants).
Now we can re-compute DECL_FUNCTION_PERSONALITY from eh-cleanup which is
probably a good idea and likely will fix the ICE at -O1 (where eh-cleanup
is run before streaming LTO). But the issue will remain at -O0 so we
have to deal with it somehow (like not asserting for DECL_EXTERNAL).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42762