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.
29280 Discussions

ICE with type hierarchy and length param

IanH
Honored Contributor III
714 Views

I have been away from my Fortran compilers for too long.  As part of getting back into the swing of things, here's an ICE.

MODULE ICE20170607
  IMPLICIT NONE
  
  PRIVATE
  
  TYPE, PUBLIC, ABSTRACT :: GrandParent
  CONTAINS
  END TYPE GrandParent
  
  TYPE, EXTENDS(GrandParent), ABSTRACT :: Parent(num)
    INTEGER, LEN :: num
    REAL :: array_comp(num-1)
  END TYPE Parent
  
  TYPE, EXTENDS(Parent) :: Child
  END TYPE Child
CONTAINS
  SUBROUTINE bar(array)
    REAL, INTENT(IN) :: array(:)
    TYPE(Child(:)), ALLOCATABLE :: tmp
    
    ALLOCATE(Child(SIZE(array)+1) :: tmp)
  END SUBROUTINE bar
END MODULE ICE20170607

 

>ifort ice-20170607.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.4.210 Build 20170411
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

ice-20170607.f90(24): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
    ALLOCATE(Child(SIZE(array)+1) :: tmp)
^
[ Aborting due to internal error. ]
compilation aborted for ice-20170607.f90 (code 1)

Causes grief for the 18 beta too.

0 Kudos
1 Reply
Devorah_H_Intel
Moderator
714 Views

Hi Ian,

Thank you for the report. I was able to test the code with the same result. This issue is escalated to development for fix.

 

0 Kudos
Reply