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 VTA ICE on Fortran COMMONs (PR debug/43166)


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  <jakub@redhat.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
> 	layout_decl.
> 
> 	* gfortran.dg/debug/pr43166.f: New test.
> 

The Fortran bits are OK.

-- 
Steve


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