This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran, committed] Fix argument kind in gfc_resolve_ishftc
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Brooks Moses <brooks dot moses at codesourcery dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 7 Mar 2007 13:22:52 -0800
- Subject: Re: [patch, fortran, committed] Fix argument kind in gfc_resolve_ishftc
- References: <45EF27E9.7000006@codesourcery.com>
On Wed, Mar 07, 2007 at 01:00:25PM -0800, Brooks Moses wrote:
> This patch fixes an obvious bug in gfc_resolve_ishftc; s_kind is
> supposed to be the kind of the size argument if it exists, but is
> instead set to the kind of the shift argument.
>
> I tried to find a testcase that broke without this patch, but I couldn't
> find one. After a bit of investigation, I've concluded that this
> function (and probably quite a bit more of iresolve.c) is currently dead
> code, representing resolvers for nonexistent specific forms of generic
> intrinsics, where the generics are resolved in trans-intrinsic.c.
>
> Thus, at some point, I'll probably look at trying to prune out the dead
> code and simplify things. In the meantime, can anyone comment on
> whether this is really dead or whether I'm missing something?
>
A quick scan of iresolve.c, trans-intrinsic.c, and trans-decl.c
suggests that you are correct about the dead code. Anything
that appears in trans-decl with a gfor_fndecl_ prefix probably
invalidates anything in iresolve.c, eg.,
tree gfor_fndecl_math_ishftc4;
tree gfor_fndecl_math_ishftc8;
tree gfor_fndecl_math_ishftc16;
--
Steve