[C++/PATCH] Fix PR 30168, C++ constructors can cause invalid gimple to happen with complex typed variables

Andrew Pinski pinskia@gmail.com
Fri Mar 9 23:19:00 GMT 2007


On 12/21/06, Andrew Pinski <pinskia@gmail.com> wrote:
> On Sat, 2006-12-16 at 11:13 -0800, Andrew Pinski wrote:
> > Hi,
> >   The problem here is that we forget to update DECL_GIMPLE_REG_P when
> > updating the clone's parameter decl.  This causes either invalid gimple
> > to show up and it can also cause an ICE if the constructor is coded to
> > invoke the complex lower.
> >
> > This patch just updates DECL_GIMPLE_REG_P for the clone's parameter
> > decl.
> >
> > OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
> >
> > I will test a 4.1/4.2 version of this patch later as the rename of
> > DECL_COMPLEX_GIMPLE_REG_P to DECL_GIMPLE_REG_P on the trunk will change
> > this patch slightly.
>
> I have now committed this to the trunk as obvious since it is copying
> the flag of a decl that was cloned to the cloned decl.

And this is the 4.2/4.1 patch which I applied after a bootstrap and
test with approval from Mark M. in the bug report.

Thanks,
Andrew Pinski
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix30168.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070309/70ae408f/attachment.txt>


More information about the Gcc-patches mailing list