Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26755 Discussions

Parameterized Derived Types: (PDTs) internal compiler error with length-type parameter and a structure constructor

FortranFan
Honored Contributor II
86 Views

Fyi for readers - an incident has been submitted at the OSC for the following:

   type :: t(ell)
      integer, len :: ell
      character(len=1) :: s(ell)
   end type

   integer, parameter :: N = 2
   type(t(ell=:)), allocatable :: foo

   foo = t(ell=N)( s=transfer(source=repeat("x",ncopies=N), mold=[ character(len=1) :: ], size=N) )

end

Compiler output:

xxx>ifort /c /standard-semantics /warn:all /stand p.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64,
Version 18.0.0.124 Build 20170811
Copyright (C) 1985-2017 Intel Corporation. All rights reserved.

p.f90(9): catastrophic error: **Internal compiler error: internal abort** Please
report this error along with the circumstances in which it occurred in a Softwa
re Problem Report. Note: File and line given may not be explicit cause of this
error.
compilation aborted for p.f90 (code 1)

xxx>

 

0 Kudos
4 Replies
andrew_4619
Honored Contributor I
86 Views

Call me a Luddite but I have yet to touch a PDT even with a long stick, and I think I will ignore them for some time yet along with Visual Studio 2017 and venomous snakes. 

FortranFan
Honored Contributor II
86 Views

andrew_4619 wrote:

.. I have yet to touch a PDT ..

@Andrew,

See this thread and try out code in Quote #30,

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/746406

PDTs can be very powerful and useful. 

Unless more users try them out, the bugs will remain "hidden" in the compiler body like a virus for a long time.

FortranFan
Honored Contributor II
86 Views

Here's another case that has been turned in at the OSC:

   type :: t(ell) 
      integer, len :: ell 
   end type 

   type :: u 
      type(t(ell=:)), allocatable :: x 
   end type 

   type(t(ell=:)), allocatable :: foo 
   type(u) :: bar 

   allocate( t(ell=1) :: foo ) 

   bar = u( x=foo ) 

end 
xxx>ifort /c /standard-semantics /warn:all /stand p.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64,
Version 18.0.0.124 Build 20170811
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

p.f90(14): catastrophic error: **Internal compiler error: internal abort** Pleas
e report this error along with the circumstances in which it occurred in a Softw
are Problem Report.  Note: File and line given may not be explicit cause of this
 error.
compilation aborted for p.f90 (code 1)

xxx>

 

gib
New Contributor II
86 Views

If you are a Luddite, Andrew, then I'm a pre-Luddite.  I'm still using IVF 11.0.075, which I find completely satisfactory.

Reply