Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28808 Discussions

Internal compiler error with Intel oneAPI_2021.3.0.306.

Daniel_Dopico
New Contributor I
2,137 Views

The attached code throws the following error in Intel Fortran oneAPI_2021.3.0.306 compiler.

catastrophic error: **Internal compiler error: internal abort**

0 Kudos
1 Solution
Devorah_H_Intel
Moderator
1,368 Views

The issue has been fixed in the recently released Intel Fortran Compiler.

Latest Intel Fortran Compiler is available for download as part of oneAPI HPC Toolkit 2022.2

Download link (Click "Get It Now"): https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html

 

View solution in original post

9 Replies
FortranFan
Honored Contributor III
2,083 Views

Expect that Intel staff will pick up the "internal compiler error" from here.

And also the following variant of the case in the original post, this one might also aid in debugging:

module m
   type, abstract :: a_t
      logical :: ell = .false.
   contains
      procedure :: fun
   end type
   type, extends(a_t) :: b_t
   end type
   type :: c_t
      class(a_t), pointer :: a
   contains
      procedure :: get
   end type
   type :: d_t
      type(b_t) :: b
   end type 
contains
   function fun(a) result(r)
      class(a_t), intent(in) :: a
      class(b_t), pointer :: r
      r => null()
   end function
   function get(c) result(r)
      class(c_t), intent(in) :: c
      class(b_t), pointer :: r
      r => c%a%fun()
   end function 
   subroutine sub(c, a)
      type(c_t), intent(in) :: c
      type(d_t) :: d
      d%b = c%get()
   end subroutine 
end module 
C:\Temp>ifort /c /standard-semantics m.f90
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.3.0 Build 20210609_000000
Copyright (C) 1985-2021 Intel Corporation.  All rights reserved.

04010002_1509

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

C:\Temp>

 

Daniel_Dopico
New Contributor I
1,966 Views

Hi FF, thank you for taking your time simplifying this. Unfortunately your nice code is working for me, I have just compiled it without any error (see below).

1>------ Operación Compilar iniciada: proyecto: Fallo_compilador19, configuración: Debug Win32 ------
1>Compiling with Intel® Fortran Compiler Classic 2021.3.0 [IA-32]...
1>FortranFan_code.f90
1>Creating library...
1>
1>Build log written to "file://D:\temp\Fallo_compilador19\Fallo_compilador19\Debug\BuildLog.htm"
1>Fallo_compilador19 - 0 error(s), 0 warning(s)
========== Compilar: 1 correctos, 0 incorrectos, 0 actualizados, 0 omitidos ==========

0 Kudos
andrew_4619
Honored Contributor III
1,944 Views

Daniel, I note the FF did a 64 bit build and you did 32 bit build. There are probably other build options that may be relevant.

 

Daniel_Dopico
New Contributor I
1,924 Views

@andrew_4619, thank you very much for pointing this out, you are right. My results are:

  1. @FortranFan's code compiles in 32 bit but it throws an ICE in 64 bit.
  2. On the other hand my original code throws an ICE in both 32 and 64 bit.

I will add this thread and conclusions to the ticket, just in case it helps the engineers.

0 Kudos
Germán
New Contributor I
2,007 Views

Wow, does it need to be that compilcated? So difficult to follow...you should read the Zen of Python!

I am not currently doing Fortran and even when I did, I did not use pointers much; but, I think I see a few things wrong and/or missing in your program.

I thought that when you used pointers, you also needed to declare the targets...and I don't see the word target anywhere in your program.

You functions with return values do not have what type is the result.

In your function get(c), your pointer r is a pointer to class(b_t) and not any of its attributes.

 

Oh, sorry, I did not see the attachment...I am replying to the explicit code above.

0 Kudos
FortranFan
Honored Contributor III
1,997 Views
@German wrote:
Wow, does it need to be that compilcated? So difficult to follow...you should read the Zen of Python!

I am not currently doing Fortran and even when I did, I did not use pointers much; but, I think I see a few things wrong and/or missing in your program.

I thought that when you used pointers, you also needed to declare the targets...and I don't see the word target anywhere in your program.

You functions with return values do not have what type is the result.

In your function get(c), your pointer r is a pointer to class(b_t) and not any of its attributes.

 

Oh, sorry, I did not see the attachment...I am replying to the explicit code above.

 

@Germán ,

 

Note again what you refer to the explicit code is a "variant" of the code by @Daniel_Dopico in the original post.

The purpose here is only to make available to the Intel staff simple reproducers toward the internal compiler error (ICE).  The premise being ICEs are compiler bugs that the Intel Fortran team will want to resolve.  The code in such simple reproducers may make little sense but that's beside the point, it's the reproduction of ICE that is of interest.

Daniel_Dopico
New Contributor I
1,967 Views

Dear @Germán. As @FortranFan said, the code itself is not important. It will be useful for Intel because it triggers an "internal compiler error", therefore it is a bug in the compiler that Intel wants to fix (so do we).

The code doesn't need to make sense and it is not important if it is nonconforming with the standard or even if it is wrong and it should not compile.

Just for clarifying, the code I sent is a tiny extract of a much larger code with thousands of lines wich makes a lot of sense.

0 Kudos
Devorah_H_Intel
Moderator
1,785 Views

Thank you for your report. I have escalated this to compiler engineering. It is still happening with the latest compiler. 

0 Kudos
Devorah_H_Intel
Moderator
1,369 Views

The issue has been fixed in the recently released Intel Fortran Compiler.

Latest Intel Fortran Compiler is available for download as part of oneAPI HPC Toolkit 2022.2

Download link (Click "Get It Now"): https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html

 

Reply