Hi!

This a very minor thing, but it turns out to be a bit annoying: gfortran now
and then (rather randomly in my opinion) throws this compilation diagnostic, of
which I don't seem to make head or tail:
warning: '<anonymous>' may be used uninitialized in this function

This warning looks quite meaningless to me (at best).

Cheers!

Philippe

PS: gfortran -O1 -g -Wall -c Source.f90
Source.f90: In function 'test':
Source.f90:35: warning: '<anonymous>' may be used uninitialized in this
function

PPS: don't look for much sense, I just tried to cut down some valid sources
while keeping this behaviour...

!
      SUBROUTINE Test
!
      IMPLICIT   NONE
!
      LOGICAL ::   Logical_1
!
      INTEGER :: Integer_1
      INTEGER :: Integer_2
      INTEGER :: Integer_3
      INTEGER :: Integer_4
      INTEGER, PARAMETER :: Dft = 4
      INTEGER, PARAMETER :: Parameter_1 = 1, Parameter_2 = 2
!
      CHARACTER ( LEN = 30 ) ::   String_1
!
      READ ( 5, * ) String_1
!
      Integer_3  = Parameter_1
      Integer_4 = 666
!
      SELECT CASE ( TRIM(String_1) )
      CASE ( "A" )
        Integer_3  = Parameter_1
      CASE ( "B" )
        Integer_3  = Parameter_2
      CASE DEFAULT
        STOP
      END SELECT
!
      IF ( Integer_3 .EQ. Parameter_2 ) THEN
!
        READ ( 5, * ) Integer_1
!
        Integer_2 = 0
        DO Integer_4 = 1, Integer_1
!
          READ ( 5, * ) String_1
          SELECT CASE ( TRIM(String_1) )
          CASE ( "C" )
            Logical_1 = .TRUE.
          CASE ( "D" )
            Logical_1 = .FALSE.
          CASE DEFAULT
            STOP
          END SELECT
!
        ENDDO
      ENDIF
!
      RETURN
      END SUBROUTINE Test
!


PPPS:
gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /USER/philippe/Irix/Gcc_Sources/configure
--prefix=/usr1/MICRESS/Philippe/Tools/Gcc --enable-languages=c,fortran
--disable-maintainer-mode --disable-shared
--with-mpfr=/usr1/MICRESS/Philippe/Tools/Mpfr
--with-gmp=/usr1/MICRESS/Philippe/Tools/Gmp --with-htmldir
Thread model: posix
gcc version 4.3.0 20070522 (experimental)


-- 
           Summary: '<anonymous>' may be used uninitialized in this function
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: P dot Schaffnit at access dot rwth-aachen dot de


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

Reply via email to