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

ifx error stop line with concatenation operator produces gibberish

btrettel
Novice
1,409 Views

Minimum example is below. The latest ifx produces a gibberish error stop message. I believe this is valid Fortran 2018.

program error_stop_gibberish

implicit none

character(len=5) :: x = "fails"

error stop "This " // x

end program error_stop_gibberish

Output:

$ ifx --version
ifx (IFX) 2024.0.2 20231213
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.

$ ifx -stand:f18 error_stop_gibberish.f90 
$ ./a.out 
T�3;�This

The precise message printed varies from run to run.

gfortran and nvfortran both give the expected output including "This fails". The output varies from compiler to compiler as some add the prefix "ERROR STOP" or some variation to the message, and gfortran prints a backtrace (which is nice).

This is not a showstopper as concatenating into another string and then using that string on the error stop line works fine. So I don't expect this potential bug report to be high priority.

Labels (1)
0 Kudos
1 Solution
Ron_Green
Moderator
1,066 Views

We found the root cause of this bug and have a fix for this.  This fix will appear in the 2024 Update 2.  Not the Update 1 coming out very soon.  Update 2 will be roughly late June or July.

View solution in original post

0 Kudos
8 Replies
FortranFan
Honored Contributor III
1,358 Views

@btrettel wrote:

..The latest ifx produces a gibberish error stop message. I believe this is valid Fortran 2018 ..

 I don't expect this potential bug report to be high priority.


Intel Software Team,

It's nice of OP to state this is not "high priority" for them.  Nonetheless, it will be nice if Intel team can give this a close look since IFORT has supported this extension for a while now, one which is introduced in the language since Fortran 2018, and there are codes out there that have come to depend on this standard facility.  Thus this can delay the adoption of IFX.

0 Kudos
JFH
Beginner
1,331 Views

When I tried that program with ifx 2024.0.2 without specifying f18 I got the expected output 'This fails' in a Linux Ubuntu system even though the program uses a feature new in Fortran 2018. 

0 Kudos
btrettel
Novice
1,319 Views

JFH, that's interesting. I'm running Ubuntu 20.04 LTS, which is still getting updates, but is old now. Which OS version do you have? Also, I'm using the stand-alone version of the Intel compilers. I'm curious if you have the full HPC toolkit as that might explain the difference.

You don't need to specify -stand:f18. I just did that as a check that the code followed the standard.

As a check, ifort on my system produces the expected result.

0 Kudos
Ron_Green
Moderator
1,277 Views

looks legal to me - STOP statement code is no longer (as of F18) required to be a constant expression.  It can be any scalar expression of type integer or default character, as in this case.

We will get a bug report opened on this.  Thanks for sending this to us to help improve ifx.

0 Kudos
Ron_Green
Moderator
1,276 Views

I tested on FC 38 and I get gibberish with ifx.  ifort no problem.  I'll try a few other OSes but for sure there is a problem with ifx.

0 Kudos
Ron_Green
Moderator
1,256 Views

the bug ID is CMPLRLLVM-56977


0 Kudos
Ron_Green
Moderator
1,067 Views

We found the root cause of this bug and have a fix for this.  This fix will appear in the 2024 Update 2.  Not the Update 1 coming out very soon.  Update 2 will be roughly late June or July.

0 Kudos
Devorah_H_Intel
Moderator
508 Views

This issue has been fixed in the recently released Intel Fortran Compiler, available for download as part of Intel HPC Toolkit 2024.2.1

0 Kudos
Reply