http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54594
Bug #: 54594
Summary: [OOP] Type-bound ASSIGNMENTs (elemental + array
version) rejected as ambiguous
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created attachment 28197
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28197
generic_defined_assignment.f90
(Note, I haven't checked whether the following bug report is valid.=
The following program by James Van Buskirk compiles with Cray ftn and prints:
Explicit calls:
Overloaded
Overloaded
Overloaded
Implicit calls:
Overloaded array->array
Overloaded scalar->array
Overloaded
However, it fails with gfortran with the error:
generic :: assignment(=) => a_ass
1
Error: 'a_ass' and 'a_ass_sv' for GENERIC '=' at (1) are ambiguous
Note for the defined assignment, you need the patch for PR46897, cf.
http://gcc.gnu.org/ml/fortran/2012-09/msg00034.html
See also discussion at
https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/5eAz5ns6AG0