[Bug fortran/60853] New: Failure to disambiguate generic with unlimited polymorphic
Thomas.L.Clune at nasa dot gov
gcc-bugzilla@gcc.gnu.org
Tue Apr 15 20:59:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60853
Bug ID: 60853
Summary: Failure to disambiguate generic with unlimited
polymorphic
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: Thomas.L.Clune at nasa dot gov
Created attachment 32609
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32609&action=edit
F90 reproducer
The attached reproducer shows the compiler failing to disambiguate two
type-bound procedures. TKR should disambiguate these procedures, as one acts on
a scalar while the other acts on a 1D array. Not that if "assignment(=)" is
replaced by something else, e.g. "copy", then the code is accepted. (Possibly
I've missed something about implied ELEMENTAL in assignment? But other
compilers do accept this code.)
Details for my environment:
gfortran -c -v -save-temps unlimitePolymorphicGeneric.F90
Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-apple-darwin12
Configured with:
/opt/local/var/macports/build/_opt_mports_dports_lang_gcc49/gcc49/work/gcc-4.9-20140406/configure
--prefix=/opt/local --build=x86_64-apple-darwin12
--enable-languages=c,c++,objc,obj-c++,fortran,java
--libdir=/opt/local/lib/gcc49 --includedir=/opt/local/include/gcc49
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-4.9 --with-local-prefix=/opt/local
--with-system-zlib --disable-nls --program-suffix=-mp-4.9
--with-gxx-include-dir=/opt/local/include/gcc49/c++/ --with-gmp=/opt/local
--with-mpfr=/opt/local --with-mpc=/opt/local --with-cloog=/opt/local
--enable-cloog-backend=isl --disable-cloog-version-check
--enable-stage1-checking --disable-multilib --enable-lto
--enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--with-pkgversion='MacPorts gcc49 4.9-20140406_0'
Thread model: posix
gcc version 4.9.0 20140406 (experimental) (MacPorts gcc49 4.9-20140406_0)
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.8.5' '-c' '-v' '-save-temps'
'-mtune=core2'
/opt/local/libexec/gcc/x86_64-apple-darwin12/4.9.0/f951
unlimitePolymorphicGeneric.F90
-cpp=/var/folders/n1/j8dsqkvd1935f8myzbps0b6c0ytd28/T//ccVIYsF4.f90 -quiet -v
-D__DYNAMIC__ unlimitePolymorphicGeneric.F90 -fPIC -quiet -dumpbase
unlimitePolymorphicGeneric.F90 -mmacosx-version-min=10.8.5 -mtune=core2
-auxbase unlimitePolymorphicGeneric -version -fintrinsic-modules-path
/opt/local/lib/gcc49/gcc/x86_64-apple-darwin12/4.9.0/finclude -o
unlimitePolymorphicGeneric.s
GNU Fortran (MacPorts gcc49 4.9-20140406_0) version 4.9.0 20140406
(experimental) (x86_64-apple-darwin12)
compiled by GNU C version 4.9.0 20140406 (experimental), GMP version 6.0.0,
MPFR version 3.1.1-p2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/opt/local/lib/gcc49/gcc/x86_64-apple-darwin12/4.9.0/../../../../../x86_64-apple-darwin12/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/local/lib/gcc49/gcc/x86_64-apple-darwin12/4.9.0/finclude
/opt/local/lib/gcc49/gcc/x86_64-apple-darwin12/4.9.0/include
/opt/local/include
/opt/local/lib/gcc49/gcc/x86_64-apple-darwin12/4.9.0/include-fixed
/usr/include
End of search list.
GNU Fortran (MacPorts gcc49 4.9-20140406_0) version 4.9.0 20140406
(experimental) (x86_64-apple-darwin12)
compiled by GNU C version 4.9.0 20140406 (experimental), GMP version 6.0.0,
MPFR version 3.1.1-p2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
unlimitePolymorphicGeneric.F90:8.33:
generic :: assignment(=) => copyFromScalar, copyFromArray
1
Error: Ambiguous interfaces 'copyfromarray' and 'copyfromscalar' in intrinsic
assignment operator at (1)
More information about the Gcc-bugs
mailing list