This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50199] [4.7 Regression] wrong code with -flto -fno-merge-constants
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jan 2012 13:14:17 +0000
- Subject: [Bug middle-end/50199] [4.7 Regression] wrong code with -flto -fno-merge-constants
- Auto-submitted: auto-generated
- References: <bug-50199-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50199
--- Comment #10 from Jan Hubicka <hubicka at ucw dot cz> 2012-01-04 13:14:17 UTC ---
> > In general it would be very useful to have pass tagging ADDR_EXPRs on whether
> > the address of object taken needs to be unique or can change freely. This would
> > be useful at several places in IPA and also we could then only promote some of
> > the const decls.
>
> Well, whether or not is the Frontends burden to decide. And if not,
> it has to use an ADDR_EXPR of a CONST_DECL.
What I meant here is pass that tracks uses of ADDR_EXPR to see if it possibly
can be compared for equality that would break when the object gets duplicated
for some reason. This would strenghten some stuff, like hidding COMDAT
functions (where we special case already virtual functions, but we could do
more)
Honza