Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29234 ディスカッション

Regression with fpp 2025.2.0

Matt_Thompson
初心者
1,249件の閲覧回数

A library I help maintain cannot be compiled by ifx 2025.2.0 because there seems to be a bug in fpp 2025.2.0

An example is this code:

#define __VERIFY__(a) if(internal_verify(a,rc=rc)) return
#define __RC__ rc=status); __VERIFY__(status
foo(__RC__)

This is a *very* whittled down version of what the actual code is, but it demonstrates the issue.

To wit, using fpp 2025.2.0:

> fpp -V
Intel(R) Fortran Preprocessor for applications running on Intel(R) 64, Version 2025.2.0 Build 20250605
Copyright (C) 1985-2025 Intel Corporation. All rights reserved.
^C
> fpp Lexer.F90
# 1 "Lexer.F90"



Lexer.F90(3): #error: number of arguments doesn't match.
foo(rc=status); if(internal_verify(status,rc=rc)) return
> echo $?
1

Now we use fpp 2025.1.0:

> fpp -V
Intel(R) Fortran Preprocessor for applications running on Intel(R) 64, Version 2025.1.0 Build 20250317
Copyright (C) 1985-2025 Intel Corporation. All rights reserved.
^C
> fpp Lexer.F90
# 1 "Lexer.F90"


foo(rc=status); if(internal_verify(status,rc=rc)) return
> echo $?
0

 

Note that the preprocessor returns the exact same code but fpp 2025.2.0 returns an error message and a non-zero-status code. Thus, ifx halts since fpp is failing.

I will also say every other preprocessor I've tried works as well. cpp:

> cpp --version
cpp (GCC) 15.1.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> cpp Lexer.F90
# 0 "Lexer.F90"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "Lexer.F90"


foo(rc=status); if(internal_verify(status,rc=rc)) return
> echo $?
0

and NAG Fortran:

> nagfor -V
NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7228
Product NPL6A72NA for x86-64 Linux
Copyright 1990-2024 The Numerical Algorithms Group Ltd., Oxford, U.K.
> nagfor -F Lexer.F90
NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7228
> echo $?
0
> cat Lexer.f90
# 1 "Lexer.F90"


foo(rc=status); if(internal_verify(status,rc=rc)) return

And, as before, the resulting processed code is always the same.

I suppose I could do something like:

ifx -fpp-name=/path/to/cpp

but I'm not sure if cpp does all the same stuff fpp does and if we are relying on some fpp-only macro.

0 件の賞賛
1 返信
Matt_Thompson
初心者
692件の閲覧回数

Update. It looks like fpp 2025.2.1 does NOT fix this, sadly:

 

> cat test.F90
#define __VERIFY__(a) if(internal_verify(a,rc=rc)) return
#define __RC__ rc=status); __VERIFY__(status
foo(__RC__)

> fpp -V
Intel(R) Fortran Preprocessor for applications running on Intel(R) 64, Version 2025.2.1 Build 20250806
Copyright (C) 1985-2025 Intel Corporation. All rights reserved.
^C
> fpp ./test.F90
# 1 "test.F90"



test.F90(3): #error: number of arguments doesn't match.
foo(rc=status); if(internal_verify(status,rc=rc)) return

> echo $?
1

 

返信