[Bug lto/69254] [6 Regression] ICE in streamer_get_builtin_tree when using -fsanitize=shift on the compile side only
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 22 18:02:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 37435
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37435&action=edit
gcc6-pr69254-wip.patch
WIP patch. This handles the merging of the -fsanitize=/-fno-sanitize= options
from the various TUs, except for the first TU (we don't call merge_and_complain
for that, so right now it just passes through all the
-fsanitize=/-fno-sanitize=, which is undesirable, it should do what
merge_and_complain does with those options and remove the others). Perhaps
merge_and_complain should be called in all cases, and for the first file be
told by some bool arg it is the first one.
But, before handling that, I see much bigger problem, and it is not only
related to -fsanitize=, but to various other options.
The thing is that the linker options are appended after the options derived
from the TUs. If I say have a TU that has some OpenMP code in it and compile
it with -c -flto -fopenmp, and then link with -flto or -flto -fopenmp, it works
fine, but if I link with -flto -fno-openmp, I get very similar ICE to this PR.
So clearly there are some options that should at least in some cases override
even the linker options/
More information about the Gcc-bugs
mailing list