This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/77397] function initializing global static variables is not optimized away fully
- 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, 30 Aug 2016 09:40:01 +0000
- Subject: [Bug ipa/77397] function initializing global static variables is not optimized away fully
- Auto-submitted: auto-generated
- References: <bug-77397-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77397
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-08-30
CC| |hubicka at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Component|c++ |ipa
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is that the global initializer function is created very early (by
frontends) rather than having global initializers being first-class citizens
in the symtab code (registering inline functions as DECL_INITIAL maybe).