[Patch, Fortran] PR37420 - Fix -Wunused-variable.

H.J. Lu hjl.tools@gmail.com
Wed Sep 10 15:14:00 GMT 2008


On Tue, Sep 9, 2008 at 11:07 AM, Tobias Burnus <burnus@net-b.de> wrote:
> With the support for warning about unset result variables, printing a
> warning about other unused variables got disabled. The solution is to
> move sym->mark down.
>
> sym->mask = sym->result->mark is unneeded. If the function name = result
> name then  sym->result is a pointer to sym and if not, then setting
> sym->mask is not needed.
>
> Build and check-gfortran regtested on x86-64-linux.
> OK for the trunk?
>
> Tobias
>
> 2008-09-09  Tobias Burnus  <burnus@net-b.de>
>
>        PR fortran/37420
>        * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
>
> 2008-09-09  Tobias Burnus  <burnus@net-b.de>
>
>        PR fortran/37420
>        * gfortran.dg/warn_unused_var.f90: New test.
>        * gfortran.dg/warn_unused_var.f90: Add cleanup-modules.
>

This may have broken gcc bootstrap. On Linux/x86, I got


In file included from /export/gnu/src/gcc-work/gcc/libgfortran/fmain.c:1:
/export/gnu/src/gcc-work/gcc/libgfortran/libgfortran.h:260:2: error:
#error "GFC_INTEGER_4 should be available for the library to compile".
In file included from /export/gnu/src/gcc-work/gcc/libgfortran/fmain.c:1:


-- 
H.J.



More information about the Fortran mailing list