https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 37463 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37463&action=edit gcc6-pr69254.patch Updated untested patch, tested so far just on simple testcases (with -fsanitize=undefined, -fopenmp and -fcilkplus). Absolutely no idea what to do for the testsuite, I'm afraid this can be only tested in the lto.exp framework, but for the interesting cases needs to know if -fopenmp, -fopenacc, -fcilkplus or -fsanitize= etc. can be used.