[PATCH] Fix PR fortran/29982, ICE with builtin folding and argument passing

Andrew Pinski pinskia@gmail.com
Sun Nov 26 03:15:00 GMT 2006


Hi,
  The problem here is the builtin folding can introduce a NOP_EXPR which
confuses the other part of the middle-end once we created a &CONST_DECL
which held the constant.

This patch fixes the problem by stripping off the NOP_EXPR before
creating a CONST_DECL.

OK? Bootstrapped and tested on i686-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

	* trans-expr.c (gfc_conv_expr_reference): Strip off NOP_EXPRs.

	* gfortran.fortran-torture/compile/parameter_3.f90: New
	testcase.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixbuiltin-const.diff.txt
Type: text/x-patch
Size: 1042 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061126/9669cc3c/attachment.bin>


More information about the Gcc-patches mailing list