Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Valid code rejected?

jahern
Beginner
662 Views
Hello,

This code was rejected byifort11.1 20090511, froml_cprof_p_11.1.038 on Fedora 11 x86_64.
[plain]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 [/plain]
I receive the following error message:
[plain]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)[/plain]
However, I believe this code to be valid: data-ref refers to %comp, and it is polymorphic. See:


If I alter the code to have obj polymorphic and allocate it, as in the follow-up in my previous thread, I get:
[plain]0_12032

: catastrophic error: **Internal compiler error: internal abort** Please report[/plain]
[plain]this error along with the circumstances in which it occurred in a Software Probl[/plain]
[plain]em Report.  Note: File and line given may not be explicit cause of this error.

compilation aborted for bug.f90 (code 3)[/plain]
Regards,
Jared

0 Kudos
3 Replies
jahern
Beginner
662 Views
Ha. Okay, I messed up the formatting there... oops. Maybe I shouldn't have bothered to put the error msgs into code snibbits.
0 Kudos
Kirill_Mavrodiev__In
662 Views

Hi All,

There are submitted Defects reports regardingInternal Compiler Error(ICE) and for error #8307. (

DPD200137426 and DPD200137377)

Kirill.

0 Kudos
jahern
Beginner
662 Views

Hi All,

There are submitted Defects reports regardingInternal Compiler Error(ICE) and for error #8307. (

DPD200137426 and DPD200137377)

Kirill.


Ah, thanks! I had forgotten to check around for them.
0 Kudos
Reply