This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61564] #pragma GCC optimize ("-fno-lto") causes the compiler to crash


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")
         ^~~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]