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.

Possible compiler bug

sarai
Beginner
1,820 Views

Hi,

while compiling a program I am working on, I get the following error:

"...catastrophic error: **Internal compiler error: segmentation violation signal raised**..."

The code compiles with both gfortran 9 and 10. My issue is that I cannot locate the cause of the error.

I am compiling with the latest ifort compiler available through oneAPI for mac. But I have also tried with previous versions of the compiler, with the same result.

 

I have 'reduced' the code to a minimal (nonsensical) example  that triggers the error message.  This example also compiles with the gnu compilers.

Compiler flags: -warn all -stand f18 -i8

 

Thanks!

 

 

 

Labels (1)
0 Kudos
7 Replies
Steve_Lionel
Honored Contributor III
1,808 Views

Internal compiler error is ALWAYS a compiler bug, regardless of the validity of the source.

0 Kudos
sarai
Beginner
1,735 Views

Is there a way to identify what triggers the bug?

0 Kudos
andrew_4619
Honored Contributor III
1,724 Views

There is no 'easy' way to find the cause. One strategy is to progressively add or remove the compiler options. The presence of some specific option is often a trigger  "-warn all" covers a number of option BTW.

 

The other option is to pair back the code (which it seems you have worked on) to create a minimalist reproducer.  This can be very time consuming.

sarai
Beginner
1,674 Views

Thanks for the suggestion! Unfortunately, even without any of the compler flags,  encounter the error.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,657 Views

Then remove sections of code in a search pattern. Use !dir$ IF(.FALSE.) / !dir$ END IF to encapsulate code removed. e.g. the code part of the suspected procedure. When you locate the offending procedure, move the !dir$ IF(.FALSE.) down and/or  !dir$ END IF up while marking the former location(s) with comment. Eventually you will narrow in on the problem section of code.

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
1,654 Views

The specific line that triggers the error is:

call output%printf()

in classA.F90. The Intel compiler developers would have to figure out why. I did note that if I commented out that line, the program still failed to build with other "normal" errors, probably caused by the code reduction - I have not investigated those.

0 Kudos
sarai
Beginner
1,647 Views

Thanks! I also notice that moving the use  statement

   use global_out, only: output

to the routine that calls

  call output%printf()

also eliminates the issue. I have attached a new set of files that will compile when the offending line is commented out.

0 Kudos
Reply