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

ICE with locals declared in a block construct (IFX)

Andrew_Smith
Valued Contributor I
933 Views
subroutine foo()
   block
      real a, b
   end block
end

xfortcom: Fatal: There has been an internal compiler error (C0000005).
ifx: error #10298: problem during post processing of parallel object compilation

Windows 10 with VS2022, oneAPI 2023.1

8 Replies
Barbara_P_Intel
Moderator
897 Views

I can't duplicate this ICE on Windows or Linux with ifx 2023.1.0.

What compiler options are you using?

>ifx -what -c foo.f90
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2023.1.0 Build 20230320
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

 Intel(R) Fortran 23.0-1474.2
>

 On Windows I ran in a oneAPI command window. 

0 Kudos
Andrew_Smith
Valued Contributor I
891 Views

It is a debug config for 64 bit. Compiles OK in release config.

All options:
/nologo /debug:full /MP /Od /fpp /I"..\IMSL\emt64" /I"D:\Dev\r23.1.0\rxsstaticscalculator\MSXMLInterface\x64\Debug" /I"D:\Dev\r23.1.0\rxsstaticscalculator\Utilities\x64\Debug" /I"D:\Dev\r23.1.0\rxsstaticscalculator\DifferentialMaths\x64\Debug" /I"D:\Dev\r23.1.0\rxsstaticscalculator\DataPackage\x64\Debug" /I"D:\Dev\r23.1.0\rxsstaticscalculator\MathsConstants\x64\Debug" /DINITNAN /DDEBUGV /Dx64 /DenhancedChecking /Qopenmp /standard-semantics /stand:f18 /warn:declarations /warn:unused /warn:interfaces /Qinit:snan /Qinit:arrays /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\\vc170.pdb" /traceback /check:bounds /check:shape /check:uninit /check:format /check:output_conversion /check:stack /libs:dll /threads /dbglibs /Qmkl:parallel /c

0 Kudos
Barbara_P_Intel
Moderator
865 Views

Thank you! It's the /Qinit:snan that is causing the ICE on both Windows and Linux. Remove that as a workaround.

I tried an early version of the compiler that is planned for release near the end of 2023. I did not get an ICE on Linux.

 

 

0 Kudos
Mark_Lewy
Valued Contributor I
804 Views

Aside (?): BLOCK constructs seem to be a bit flaky with IFX 2023.1.  I've reported one example to support (05854745), which should be fixed in 2023.2.  I worked around it by changing the BLOCK construct to a DO construct (with EXIT before END DO), but I didn't have any declared variables in the BLOCK.

0 Kudos
hakostra1
New Contributor II
661 Views

I had a very similar error, but with integers and not reals in the BLOCK:

MODULE pointers_mod
    IMPLICIT NONE(type, external)
CONTAINS
    SUBROUTINE init_pointers()
        BLOCK
            INTEGER :: igrid
            INTEGER :: nsize3d

            CONTINUE
        END BLOCK
    END SUBROUTINE init_pointers
END MODULE pointers_mod

When compiled with "ifx -V -O0 -g -init=huge -c pointers_mod.F90" I get:

Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2023.2.0 Build 20230721
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

 Intel(R) Fortran 23.0-1769.01
 #0 0x0000000002228e97 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2228e97)
 #1 0x0000000002228fc0 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2228fc0)
 #2 0x00007fe661242520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x0000000002e01eb8 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2e01eb8)
 #4 0x00000000031eb4c3 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x31eb4c3)
 #5 0x00000000031ebf18 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x31ebf18)
 #6 0x000000000311529d (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x311529d)
 #7 0x0000000002555100 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2555100)
 #8 0x000000000216676b (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x216676b)
 #9 0x0000000002165047 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2165047)
#10 0x0000000002111a78 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2111a78)
#11 0x00000000022e13ce (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x22e13ce)
#12 0x00007fe661229d90 __libc_start_call_main libc_start_call_main.h:58
#13 0x00007fe661229e40 call_init libc-start.c:128
#14 0x00007fe661229e40 __libc_start_main libc-start.c:379
#15 0x0000000001f51aa9 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x1f51aa9)

/tmp/ifx1705834558GvM5l3/ifxqKA9WC.i90: error #5633: **Internal compiler error: segmentation violation signal raised** 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 pointers_mod.F90 (code 3)

The error happens at all optimization levels, but only when "-init=huge" is present. If I remove one of the INTEGER's in the BLOCK construct the error vanish (i.e. it seems necessary to have more than one integer in there for the error to appear).

0 Kudos
hakostra1
New Contributor II
661 Views

Same error with integers in a block:

MODULE pointers_mod
    IMPLICIT NONE(type, external)
CONTAINS
    SUBROUTINE init_pointers()
        BLOCK
            INTEGER :: igrid
            INTEGER :: nsize3d

            CONTINUE
        END BLOCK
    END SUBROUTINE init_pointers
END MODULE pointers_mod

With "ifx -V -O0 -g -init=huge -c pointers_mod.F90" I get:

Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2023.2.0 Build 20230721
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

 Intel(R) Fortran 23.0-1769.01
 #0 0x0000000002228e97 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2228e97)
 #1 0x0000000002228fc0 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2228fc0)
 #2 0x00007fe661242520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x0000000002e01eb8 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2e01eb8)
 #4 0x00000000031eb4c3 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x31eb4c3)
 #5 0x00000000031ebf18 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x31ebf18)
 #6 0x000000000311529d (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x311529d)
 #7 0x0000000002555100 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2555100)
 #8 0x000000000216676b (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x216676b)
 #9 0x0000000002165047 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2165047)
#10 0x0000000002111a78 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x2111a78)
#11 0x00000000022e13ce (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x22e13ce)
#12 0x00007fe661229d90 __libc_start_call_main libc_start_call_main.h:58
#13 0x00007fe661229e40 call_init libc-start.c:128
#14 0x00007fe661229e40 __libc_start_main libc-start.c:379
#15 0x0000000001f51aa9 (/opt/intel/oneapi/compiler/2023.2.1/linux/bin-llvm/xfortcom+0x1f51aa9)

/tmp/ifx1705834558GvM5l3/ifxqKA9WC.i90: error #5633: **Internal compiler error: segmentation violation signal raised** 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 pointers_mod.F90 (code 3)
0 Kudos
Barbara_P_Intel
Moderator
657 Views

@hakostra1, your reproducer also works fine in the version of ifx destined to be released later this year in Q4.

 

0 Kudos
Barbara_P_Intel
Moderator
512 Views

The version of ifx that was released this week has the fix for the ICE you reported. Please give it a try!

 

 

0 Kudos
Reply