[Bug fortran/60122] New: Unexpected warning for uninitialised character variable

fmartinez at gmv dot com gcc-bugzilla@gcc.gnu.org
Sun Feb 9 00:08:00 GMT 2014


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

            Bug ID: 60122
           Summary: Unexpected warning for uninitialised character
                    variable
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fmartinez at gmv dot com

The attahed code produces an unexpected warning.

test.f90: In function ‘test’:
test.f90:9:0: warning: ‘.s’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   s = c
 ^

The build command is:
/opt/gcc/bin/gfortran -c -Wall test.f90

The compiler version:
Using built-in specs.
COLLECT_GCC=/opt/gcc/bin/gfortran
COLLECT_LTO_WRAPPER=/home/fran/compilers/gcc/gcc-4.9/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.9-source/gcc-4.9-20140202/configure
--enable-languages=c,c++,fortran --enable-checking=release --disable-libmudflap
--disable-libstdcxx-pch --enable-libgomp --enable-lto --enable-gold
--with-plugin-ld=/usr/bin/gold --with-cloog-include=/usr/include-cloog
--with-cloog-lib=/usr/lib64 --prefix=/usr/local/gcc-4.9
Thread model: posix
gcc version 4.9.0 20140202 (experimental) (GCC)


More information about the Gcc-bugs mailing list