| Thread Tools | Search this thread |
|---|
jahern
| June 27, 2009 9:12 AM PDT Valid code rejected? | ||||
Hello,
This code was rejected by ifort 11.1 20090511, from l_cprof_p_11.1.038 on Fedora 11 x86_64.
PROGRAM invalid
IMPLICIT NONE
TYPE, ABSTRACT :: foo
INTEGER :: i
END TYPE foo
TYPE, EXTENDS(foo) :: bar
INTEGER :: j
END TYPE bar
TYPE wrapper
CLASS(foo), ALLOCATABLE :: comp
END TYPE wrapper
TYPE(wrapper) :: obj
ALLOCATE(bar :: obj%comp)
END PROGRAM invalid
I receive the following error message:bug.f90(13): error #8307: If the rightmost part-name is of abstract type, data-ref shall be polymorphic [COMP] ALLOCATE(bar :: obj%comp) -----------------------^ compilation aborted for bug.f90 (code 1) However, I believe this code to be valid: data-ref refers to %comp, and it is polymorphic. See:
http://groups.google.com/group/comp.lang.fortran/browse_frm/thread/8e9ba2e6d2216e9e#
If I alter the code to have obj polymorphic and allocate it, as in the follow-up in my previous thread, I get:
0_12032 : catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Probl em Report. Note: File and line given may not be explicit cause of this error. compilation aborted for bug.f90 (code 3) Regards,
Jared
| |||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
| 8445 users have contributed to 31553 threads and 100398 posts to date. |
|---|
| In the past 24 hours, we have 10 new thread(s) 30 new posts(s), and 43 new user(s). In the past 3 days, the most popular thread for everyone has been Lost in MKL The most posts were made to TBB on linux segfaulting The post with the most views is Hi,if you were using imsl yo Please welcome our newest member nonamez |