This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] RFC: Fix GCSE bug optimization/11440 (3.3 regression)
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Mark Mitchell <mark at codesourcery dot com>,gcc-patches at gcc dot gnu dot org,Roger Sayle <roger at www dot eyesopen dot com>,law at redhat dot com
- Date: Mon, 14 Jul 2003 17:47:55 +0200
- Subject: Re: [PATCH] RFC: Fix GCSE bug optimization/11440 (3.3 regression)
- References: <EF3CBAF2-B60F-11D7-8A0C-000393A6D2F2@physics.uc.edu>
On Monday 14 July 2003 17:29, Andrew Pinski wrote:
> > Committed.
> >
> > I switched myself into RTL->C converter mode and managed to create a
> > small
> > ugly looking C testcase that shows the bug on powerpc-linux-gnu when
> > executed.
> >
> > OK to commit to mainline and branch?
> >
> > Franz.
> >
> > PR optimization/11440
> > * gcc.c-torture/execute/20030714-1.c: New testcase.
> >
> > <20030714-1.c>
>
> The test contains invalid code (jumps inside a statement expression to
> the
> outside should be invalid code, there is a PR for documentation on what
> is
> invalid, this code might fail on the tree-ssa branch because of those
> gotos).
>
> ({
> ({
> tmp = this->m_positioned;
> goto l0;
> 0;
> });
>
> l0:
> 0;
> });
>
> I would change this to be just:
> tmp = this->m_positioned;
Yes, I just read your other post about that and leaving out the goto's and
statement expressions still produces a working/failing testcase.
Note that the original code resembles the code generated by the C++ frontend
more closely, it jumps out from the inner block to the outer block. I guess
for tree-ssa the C++ frontend is already changed. Avoiding all the jump insns
probably is also a slight compile speed win for C++.
I'll commit the changed testcase.
Franz.