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

"internal error" with "PARAMETER" attribute

Baschti
Beginner
383 Views

Hi,

I got some code from a colleague, which compiled with other Fortran Compilers, but with Intel I get an "internal error". I boiled it down to a minimal example:

PROGRAM test
REAL, PARAMETER :: a(4) = (/1.0, 2.0, 3.0, 4.0/)

! This gives the internal error
!REAL, PARAMETER :: b(4) = a / SUM(a)
!The following workaround is ok
REAL, PARAMETER :: a_sum = SUM(a)
REAL, PARAMETER :: b(4) = a / a_sum

WRITE(*,*) b
END PROGRAM
#> ifort --version
ifort (IFORT) 2021.7.1 20221019
Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

Error:

#> ifort test.f90
test.f90(4): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
REAL, PARAMETER :: b(4) = a / SUM(a)
^
[ Aborting due to internal error. ]

with workaround:

#> ifort test.f90
#> ./a.out
0.1000000 0.2000000 0.3000000 0.4000000

Kind regards,

Bastian

0 Kudos
2 Replies
Baschti
Beginner
377 Views

addition: Error message from ifx

#> ifx test.f90
test.f90(5): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
REAL, PARAMETER :: b(4) = a / SUM(a)
^
test.f90(5): catastrophic error: Internal Compiler Error: Ref module: ffe_ccvt.c
compilation aborted for test.f90 (code 1)
0 Kudos
TobiasK
Moderator
295 Views

@Baschti

thanks for reporting this. Unfortunately, it's still failing with our internal development build. I will escalate it to our developers.


0 Kudos
Reply