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

ifort12+openmp+return before "C$OMP PARALLEL DO" = "**Internal compiler error: segmentation violation signal raised** "

Yakov_Mindelis
Beginner
316 Views
This forum is the closest to "bug report" I got. If there's a facility to submit bugs, please point me at it ...

The code:
[fxfortran]      SUBROUTINE INITWDIS(IDIM,JDIM,KDIM,WDIS)
C
      REAL WDIS(IDIM,JDIM,KDIM)
C
#ifdef FAIL
      RETURN
#else
      if(1 .EQ. 1) RETURN
#endif
C
C$OMP PARALLEL DO PRIVATE(K,J,I)
      DO K = 1, KDIM
         DO J = 1, JDIM
            DO I = 1, IDIM
               DIS = 1.0E66
C
            END DO
         END DO
      END DO
C

      RETURN
      END
C[/fxfortran]
when compiling using this command ("RETURN" statement is conditioned by an "IF"), all is well:

[bash]ifort -fpp -DHAVESECNDS -DHAVEVARINFORMAT -extend_source -DNESTEDOMP -openmp -r8 -m64 -c ifort12_fail.f [/bash]


when compiling using this command ("RETURN" statement is alone), internal compiler error occurs:

[bash]ifort -fpp -DHAVESECNDS -DHAVEVARINFORMAT -extend_source -DNESTEDOMP -openmp -r8 -m64 -c ifort12_fail.f  -DFAIL[/bash]


without
[bash]-openmp[/bash]

the code compiles OK.

Edit:
Compilers involved: 12.0.5 on MACOS, 12.0.4 on Linux x86_64


TIA,
Jack
0 Kudos
2 Replies
TimP
Honored Contributor III
316 Views
Granted, wrong code should produce an error diagnostic, not an internal error. I don't see how you could say "compiles OK" without fixing the source code.
I can get an internal error when I don't set -fpp, but not with that option.
0 Kudos
Steven_L_Intel1
Employee
316 Views
I can reproduce this and will escalate it to development. I assume that this is not a blocking issue for you. Issu ID is DPD200172987.

You can submit bugs here or, if you have a current support license, through Intel Premier Support. Click the Tech Support link on this forum's main page for more information.
0 Kudos
Reply