This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix PPC Java build problem
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org, java at gcc dot gnu dot org
- Date: Mon, 14 Oct 2002 23:05:58 -0700
- Subject: PATCH: Fix PPC Java build problem
- Reply-to: mark at codesourcery dot com
This patch should fix the Java build problem on PPC. (The test-case
sent to me no longer crashes.)
Bootstrapped and tested on i686-pc-linux-gnu, applied on the mainline.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
2002-10-14 Mark Mitchell <mark@codesourcery.com>
* decl.c (layout_var_decl): Call layout_decl even for variables
whose type is an array with unspecified bounds.
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.948
diff -c -p -r1.948 decl.c
*** cp/decl.c 11 Oct 2002 19:55:19 -0000 1.948
--- cp/decl.c 15 Oct 2002 05:31:08 -0000
*************** layout_var_decl (decl)
*** 7617,7623 ****
`extern X x' for some incomplete type `X'.) */
if (!DECL_EXTERNAL (decl))
complete_type (type);
! if (!DECL_SIZE (decl) && COMPLETE_TYPE_P (type))
layout_decl (decl, 0);
if (!DECL_EXTERNAL (decl) && DECL_SIZE (decl) == NULL_TREE)
--- 7617,7627 ----
`extern X x' for some incomplete type `X'.) */
if (!DECL_EXTERNAL (decl))
complete_type (type);
! if (!DECL_SIZE (decl)
! && (COMPLETE_TYPE_P (type)
! || (TREE_CODE (type) == ARRAY_TYPE
! && !TYPE_DOMAIN (type)
! && COMPLETE_TYPE_P (TREE_TYPE (type)))))
layout_decl (decl, 0);
if (!DECL_EXTERNAL (decl) && DECL_SIZE (decl) == NULL_TREE)