Reported by NightStrike in #gfortran - I see the same in my build logs. Some
annotations, see below.

../../../gcc/libgfortran/io/list_read.c: In function ‘nml_read_obj’:
../../../gcc/libgfortran/io/list_read.c:2470:31: warning: comparison between
‘bt’ and ‘enum <anonymous>’
../../../gcc/libgfortran/io/write.c: In function ‘write_a_char4’:
../../../gcc/libgfortran/io/write.c:328:8: warning: passing argument 2 of
‘write_default_char4’ from incompatible pointer type
../../../gcc/libgfortran/io/write.c:44:1: note: expected ‘gfc_char4_t *’ but
argument is of type ‘const char *’
../../../gcc/libgfortran/io/unix.c: In function ‘fd_to_stream’:
../../../gcc/libgfortran/io/unix.c:750:15: warning: ‘statbuf.st_mode’ may be
used uninitialized in this function
../../../gcc/libgfortran/io/unix.c:750:15: warning: ‘statbuf.st_size’ may be
used uninitialized in this function
../../../gcc/libgfortran/intrinsics/getlog.c: In function ‘_gfortran_getlog’:
../../../gcc/libgfortran/intrinsics/getlog.c:85:3: warning: implicit
declaration of function ‘getlogin’
../../../gcc/libgfortran/intrinsics/getlog.c:85:5: warning: assignment makes
pointer from integer without a cast



../../../gcc/libgfortran/intrinsics/iso_c_binding.c: In function
‘__iso_c_binding_c_f_pointer_u0’:
../../../gcc/libgfortran/intrinsics/iso_c_binding.c:112:15: warning: ‘str’ may
be used uninitialized in this function

ISO_C_BINDING_PREFIX (c_f_pointer_u0) (void *c_ptr_in,
      for (i = 0; i < shapeSize; i++)
        {
          index_type str, ub;
          if (i == 0)
              str = 1;
            }
          else
            {
              str = str * GFC_DESCRIPTOR_EXTENT(f_ptr_out,i-1);

That looks like a real bug! The "str" declaration should be moved outside the
loop.



../../../gcc/libgfortran/intrinsics/unpack_generic.c: In function
‘unpack_internal’:
../../../gcc/libgfortran/intrinsics/unpack_generic.c:60:32: warning: unused
parameter ‘fsize’

That's
  unpack_internal (gfc_array_char *ret, const gfc_array_char *vector,
                   const gfc_array_l1 *mask, const gfc_array_char *field,
                   index_type size, index_type fsize)

And probably a side effect of Thomas' bound check work.


-- 
           Summary: libgfortran build warnings
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41219

Reply via email to