This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix VTA ICE on Fortran COMMONs (PR debug/43166)
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org, Alexandre Oliva <aoliva at redhat dot com>
- Date: Wed, 24 Feb 2010 15:32:39 -0800
- Subject: Re: [PATCH] Fix VTA ICE on Fortran COMMONs (PR debug/43166)
- References: <20100224232220.GM2817@tyan-ft48-01.lab.bos.redhat.com>
On Thu, Feb 25, 2010 at 12:22:20AM +0100, Jakub Jelinek wrote:
> The following testcase ICEs, because of a Fortran FE bug, where when a
> common needs to grow DECL_MODE isn't adjusted and thus in expand_debug_expr
> we see a VAR_DECL with BLKmode type, yet DECL_RTL for it has SImode.
> We then try to convert the modes using simplify_gen_subreg, which of course
> ICEs. The following patch fixes the Fortran FE to update also DECL_SIZE,
> DECL_MODE and other stuff (alignment, DECL_RTL if already set), but IMHO it
> doesn't hurt to make expand_debug_expr more robust too.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 2010-02-24 Jakub Jelinek <email@example.com>
> PR debug/43166
> * cfgexpand.c (expand_debug_expr) <case VAR_DECL>: If mode is
> BLKmode, assert op0 is a MEM and just adjust its mode.
> * trans-common.c (build_common_decl): Also update DECL_MODE,
> and DECL_SIZE when encountering a larger common block and call
> * gfortran.dg/debug/pr43166.f: New test.
The Fortran bits are OK.