This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61564] #pragma GCC optimize ("-fno-lto") causes the compiler to crash
- 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: Tue, 07 Jun 2016 08:02:02 +0000
- Subject: [Bug c++/61564] #pragma GCC optimize ("-fno-lto") causes the compiler to crash
- Auto-submitted: auto-generated
- References: <bug-61564-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61564
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2016-06-07
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
It looks like both the pragma and the attribute accept any kind of -f/-O
options
regardless of them being marked as 'Optimization' in the .opt file. They
get applied via decode_options and thus may have side-effects not reflected by
cl_optimization_save/restore.
I have a patch to issue
/tmp/t.c:2:9: warning: bad option -fno-lto to pragma attribute [-Wpragmas]
#pragma GCC optimize ("-fno-lto")
^~~