This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/60535] Link failure with -flto and -fsanitize=undefined
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Mar 2014 14:14:09 +0000
- Subject: [Bug sanitizer/60535] Link failure with -flto and -fsanitize=undefined
- Auto-submitted: auto-generated
- References: <bug-60535-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60535
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Created attachment 32373 [details]
> gcc49-pr60535.patch
>
> Untested fix.
>
> There are 3 remaining tests I haven't removed the dg-skip-if for yet:
> c-c++-common/ubsan/null-4.c
> c-c++-common/ubsan/overflow-int128.c
>
> These 2 fail because with -flto we get <unknown> type names instead of say
> complex double or int128_t (if I remember it well). Dunno if there is
> anything that can be done about it though.
You need to amend lto/lto-lang.c:lto_init with more NAME_TYPEs (basically
cover all global trees with a name we'd use for LTO - which would be
matching the C frontend).