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

bug in precompiler

tom_p
Beginner
662 Views
There seems to be a bug in the precompiler of Intel Fortran 11.1. Minimal example (the comment is crucial):


program deftest

implicit none

#define dshe(n1) dshe_(n1)

! dshe: this is dshe(j1)

#ifdef VCC

#endif

end program deftest


This yields:

> ifort -fpp -DVCC deftest.f90
deftest.f90(9): #error: '#ifdef' argument starts with wrong symbol.
> ifort -V
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20090630 Package ID: l_cprof_p_11.1.046
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

0 Kudos
1 Solution
Kevin_D_Intel
Employee
662 Views


The issue involves FPP attempting to extend the macro in the comment but failing to do so correctly. There is a command-line option work-around that avoids the error and having to remove or modifythe comment.

Compile with: -Qoption,fpp,-macro=no_com

I will post again about a permanent fix when available.

View solution in original post

0 Kudos
4 Replies
Kevin_D_Intel
Employee
662 Views

Thanks for reporting this. Its reproducible with our upcoming 11.1 update too. I reported to Development and will post updates as I learn it.

(Internal tracking id: DPD200139785)

(Resolution Update on 11/10/2009): This defect is fixed in the Intel Fortran Compiler Professional Edition 11.1 Update 3, (11.1.059 - Linux).
0 Kudos
Kevin_D_Intel
Employee
663 Views


The issue involves FPP attempting to extend the macro in the comment but failing to do so correctly. There is a command-line option work-around that avoids the error and having to remove or modifythe comment.

Compile with: -Qoption,fpp,-macro=no_com

I will post again about a permanent fix when available.

0 Kudos
tom_p
Beginner
662 Views
Thanks a lot, this works.

0 Kudos
Kevin_D_Intel
Employee
662 Views

This defect (DPD200139785) is fixed in the Intel Fortran Compiler Professional Edition 11.1 Update 3, (11.1.059 - Linux).
0 Kudos
Reply