This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] h8300.h: Fix an ICE from tree checking.
- To: Kazu Hirata <kazu at hxi dot com>
- Subject: Re: [patch] h8300.h: Fix an ICE from tree checking.
- From: law at redhat dot com
- Date: Tue, 31 Jul 2001 15:00:41 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <200107290108.SAA25950@cygnus.com>you write:
> Hi,
>
> Attached is a patch to fix an ICE from tree checking on h8300 port.
>
> Without the patch, DECL_EXTERNAL in ENCODE_SECTION_INFO, which expects
> 'd', causes an ICE in varasm.c when it encounters 'c'. This problem
> is commonly seen with use of complex variables.
>
> The patch fixes the problem by first checking to see if DECL is
> VAR_DECL, eliminating the compilation failures of
>
> gcc.c-torture/compile/981223-1.c
> gcc.c-torture/compile/20001222-1.c
> gcc.c-torture/compile/20000804-1.c
> gcc.c-torture/execute/builtin-complex-1.c
> gcc.c-torture/execute/complex-1.c
> gcc.c-torture/execute/complex-2.c
> gcc.c-torture/execute/complex-5.c
>
> Regression-tested. OK to apply?
It seems to me that you should find out how ENCODE_SECTION_INFO is being
called for 'c' nodes. To the best of my knowledge, it's only supposed to
be passed DECLs.
jeff