This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/65534] tailcall not optimized away
- From: "aldot at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 Dec 2015 19:33:01 +0000
- Subject: [Bug middle-end/65534] tailcall not optimized away
- Auto-submitted: auto-generated
- References: <bug-65534-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65534
--- Comment #3 from Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> ---
(In reply to Bernhard Reutner-Fischer from comment #2)
> (In reply to Jan Hubicka from comment #1)
> > > #ifndef OPTIMIZE_MANUALLY
> > > void setutent(void) {
> > > ((void)0);
> > > __setutent_unlocked();
> > > ((void)0);
> > > }
> > > #else
> > > extern __typeof (__setutent_unlocked) setutent
> > > __attribute__ ((alias ("__setutent_unlocked")));
> > > #endif
> >
> > I do not think GCC can safely optimize this, becuase in the first
> > case &setutent != &__setutent_unlocked, wile in the optimized
> > case the addresses are equal.
>
> Note that __setutent_unlocked is static, so i don't see how this specific
> case would prevent optimization?
gcc-6 stage1 passed.
Honza, please explain how'd that prevent optimization?