[C++ Patch] PR 33459

Paolo Carlini pcarlini@suse.de
Wed Sep 19 18:15:00 GMT 2007


Hi,

I have this tiny tentative patch, my analysis follows. Since the patch
for c++/32245, we are using build_zero_init for the present kind of
snippet. In general, for a CLASS_TYPE_P, it recursively calls  itself
for all the fields, and the return values are appended to a VEC that
hosts all the initializations. In the case of this PR, we have
TREE_CODE(type) == REFERENCE_TYPE at the first recursion, and a
NULL_TREE is returned, meaning, correctly for a reference (per
[dcl.init]), no initialization. However, that NULL_TREE is unnecessarily
appended to the VEC anyway, eventually leading to an ICE much later.
Seems correct to me just not appending those bogus NULL_TREEs.

Tested x86_64-linux, this one too would be for mainline and 4_2-branch,
a recent regression.

Paolo.

//////////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_33459
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070919/95e825b7/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_33459
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070919/95e825b7/attachment-0001.ksh>


More information about the Gcc-patches mailing list