This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR c++/18121 and middle-end/17407



On Oct 23, 2004, at 3:04 PM, Andrew Pinski wrote:


Two related problems relating to code which was added to the code added
to the tree-ssa branch. The problem was fixed in the wrong spot rather
than in the middle-end we fixed in the front-ends which caused C++/18121.
But since we could have a typedef so we don't layout the array type.
The way I fixed both problems is to revert the patch which fixed
PR middle-end/12920 and have build_array_type layout the type even if
the index_type is NULL.


OK? Bootstrapped and tested on powerpc-darwin.

Thanks,
Andrew Pinski

Somehow I posted a previous patch which does not work, woops.


ChangeLog:

ChangeLog:

	* c-decl.c (grokdeclarator) <case cdk_array>: Remove the call
	layout_type as it is already done by build_array_type.
	* tree.c (build_array_type): Layout the type even

cp/ChangeLog:
	* decl.c (grokdeclarator) <case cdk_array>: Remove the call
	layout_type as it is already done by create_array_type_for_decl.

testsuite/ChangeLog:
	* gcc.c-torture/compile/pr17407.c: New test.
	* g++.dg/template/array8.C: New test.


Attachment: temp.diff.txt
Description: Text document




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]