[PATCH] Fix tree-opt/29788, plain CONST_DECL leaking through
Andrew Pinski
pinskia@gmail.com
Mon Nov 13 17:56:00 GMT 2006
Hi,
The problem here is that the inliner folds *&CONST_DECL to CONST_DECL
but it forgot to inline the value of the CONST_DECL. It is not valid to
have a plain CONST_DECL in the IR and it causes different ICEs,
depending on if PRE runs or not.
This patch fixes the problem by running fold after folding *&CONST_DECL.
OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
Thanks,
Andrew Pinski
ChangeLog:
* tree-inline.c (copy_body_r): Call fold after folding indirect
reference.
* gfortran.fortran-torture/compile/inline_1.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixpr29788.diff.txt
Type: text/x-patch
Size: 1060 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061113/5d8bc2d1/attachment.bin>
More information about the Fortran
mailing list