- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I don't think that this is right! It's not polymorphic ....
MODULE Assign
IMPLICIT NONE
INTEGER :: factor
TYPE, PUBLIC :: Mytype
INTEGER :: comp = 123
CONTAINS
PROCEDURE, PRIVATE :: Copy
GENERIC :: ASSIGNMENT (=) => Copy
END TYPE Mytype
CONTAINS
PURE SUBROUTINE Copy (a, b)
CLASS(Mytype), INTENT(OUT) :: a
CLASS(Mytype), INTENT(IN) :: b
a%comp = b%comp*factor
END SUBROUTINE Copy
END MODULE Assign
PROGRAM Main
USE Assign
IMPLICIT NONE
TYPE(Mytype) :: coarray
factor = THIS_IMAGE()
SYNC ALL
IF (THIS_IMAGE() == 1) THEN
coarray = coarray[2] ! (a)
coarray[3] = coarray ! (b)
coarray[4] = coarray[5] ! (c)
END IF
END PROGRAM Main
ifort version 14.0.2
gerbil.f90(25): error #8392: If the actual argument is a polymorphic coindexed object, the dummy argument must not be polymorphic. [COARRAY]
coarray = coarray[2] ! (a)
------------------^
gerbil.f90(26): error #8392: If the actual argument is a polymorphic coindexed object, the dummy argument must not be polymorphic. [COARRAY]
coarray[3] = coarray ! (b)
--------^
gerbil.f90(27): error #8392: If the actual argument is a polymorphic coindexed object, the dummy argument must not be polymorphic. [COARRAY]
coarray[4] = coarray[5] ! (c)
--------^
gerbil.f90(27): error #8392: If the actual argument is a polymorphic coindexed object, the dummy argument must not be polymorphic. [COARRAY]
coarray[4] = coarray[5] ! (c)
---------------------^
compilation aborted for gerbil.f90 (code 1)
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi, Nick.
I agree with you that this error message is unwarranted. I'll note that defined assignment, per se, isn't relevant as you can see the same issue if you call Copy directly. I have escalated this as issue DPD200359259 and will let you know of any progress.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
We fixed the error message, but then found that the call doesn't work correctly. Working on that one....
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite