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: [gfortran] Patch for pr20363


Erik Edelmann wrote:
> The attached patch fixes pr20363.  The problem was the function
> find_special in decl.c.  When in an INTERFACE, we first checked
> if the name was the name of the interface, and only then, if it
> wasn't, we looked in the current name space.  With this patch, we
> do it the other way around.

Can you explain to me why we need find_special()?  It looks like it would
simply not make sense to call it in build_sym().  Or anywhere else, for that
matter, but maybe I misunderstand.  And with your patch it doesn't seem to do
much special any longer.  There are also a few minor issues which I point out
below.

> +  int i;
>  
> +  i = gfc_get_symbol (name, NULL, result);
> +  if (i==0) 

Blanks are required around "==".  This line has a trailing blank.

> +    goto end;

Why not simply return i;?  Also everywhere else where you goto end.

> ! { dg-do compile }
> module snafu

The testcase should say which PR it tests in a comment.

Thanks,
- Tobi


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