From 4c7c0c70e3aecf557e968d3d0941e21f1f875f83 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Mon, 25 Oct 2004 13:27:32 +0000 Subject: re PR middle-end/17407 (ICE in int_mode_for_mode) 2004-10-25 Andrew Pinski PR middle-end/17407 * c-decl.c (grokdeclarator) : Remove the call layout_type as it is already done by build_array_type. * tree.c (build_array_type): Layout the type even 2004-10-25 Andrew Pinski PR c++/18121 * decl.c (grokdeclarator) : Remove the call layout_type as it is already done by create_array_type_for_decl. 2004-10-25 Andrew Pinski PR middle-end/17407 * gcc.c-torture/compile/pr17407.c: New test. PR c++/18121 * g++.dg/template/array8.C: New test. From-SVN: r89533 --- gcc/cp/decl.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'gcc/cp/decl.c') diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 21ffb51..2aca629 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7214,13 +7214,6 @@ grokdeclarator (const cp_declarator *declarator, case cdk_array: type = create_array_type_for_decl (dname, type, declarator->u.array.bounds); - if (inner_declarator - && (inner_declarator->kind == cdk_pointer - || inner_declarator->kind == cdk_reference - || inner_declarator->kind == cdk_ptrmem)) - /* We can never complete an array type which is the - target of a pointer, so go ahead and lay it out. */ - layout_type (type); break; case cdk_function: -- cgit v1.1