http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53111
Bug #: 53111
Summary: Derived types cannot be included again when using
standard Fortran 95
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 27234
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27234
Test file which fails to compile with -std=f95
When you have a derived type defined in a module (A), which is used in another
module (B) and the program itself which also uses module(B), the compiler gives
an error with '-std=f95' option (gfortran -std=f95 -o test test.f95):
"Error: Fortran 2003: Generic name 'my' of function 'my' at (1) being the same
name as derived type at (2)"
See attached file for an example. Some extensive searching on the web and
"Modern Fortran explained" does not give reason to believe that this is the way
it is supposed to behave when adhering to the Fortran 95 standard.
Output of 'gcc -v':
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7-20120414/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id
--with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold
--enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--with-linker-hash-style=gnu --disable-multilib --disable-libssp
--disable-build-with-cxx --disable-build-poststage1-with-cxx
--enable-checking=release
Thread model: posix
gcc version 4.7.0 20120414 (prerelease) (GCC)