Bug report and bug-report/feature-request

Bug report and bug-report/feature-request

Hi,

I got the following message running

ifort (IFORT) 13.1.0 20130121
in RHEL 5 x86_64:

single_point_streaming_stats.F90: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.

The compiler was invoked as:

$ ifort -warn -stand f08 -syntax-only single_point_streaming_stats.F90

This brings me to my second (related) bug report/feature request: Would it be possible to have ifort perform the appropriate pre-processing when the -syntax-only flag is used? Or at least add a flag to enable pre-processing before feeding the code to the syntax checker? (note the .F90 extension) Note that fpp does not complain about any errors in pre-processor directives, and that if I replace the -syntax-only flag with -c it compiles without errors.

Below is a listing of all the errors and warnings created along with the catastrophic error:

$ ifort -warn -stand f08 -syntax-only single_point_streaming_stats.F90
single_point_streaming_stats.F90(2): warning #5117: Bad # preprocessor line
#ifdef DEBUGGING
-^
single_point_streaming_stats.F90(3): warning #5117: Bad # preprocessor line
#define IS_ELEMENTAL
-^
single_point_streaming_stats.F90(4): warning #5117: Bad # preprocessor line
#define IS_PURE
-^
single_point_streaming_stats.F90(5): warning #5117: Bad # preprocessor line
#else
-^
single_point_streaming_stats.F90(6): warning #5117: Bad # preprocessor line
#define IS_ELEMENTAL elemental
-^
single_point_streaming_stats.F90(7): warning #5117: Bad # preprocessor line
#define IS_PURE pure
-^
single_point_streaming_stats.F90(8): warning #5117: Bad # preprocessor line
#endif
-^
single_point_streaming_stats.F90(25): error #5082: Syntax error, found IDENTIFIER 'FUNCTION' when expecting one of: ( % [ : . = =>
 IS_ELEMENTAL function spss_op_spss(lhs,rhs) result(res)
------------------^
single_point_streaming_stats.F90(25): error #5082: Syntax error, found IDENTIFIER 'RESULT' when expecting one of: ( * ) :: , <END-OF-STATEMENT> ; . % (/ + - [ : ] /) . ' ** / ...
 IS_ELEMENTAL function spss_op_spss(lhs,rhs) result(res)
-------------------------------------------------^
single_point_streaming_stats.F90(25): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: :
 IS_ELEMENTAL function spss_op_spss(lhs,rhs) result(res)
------------------------------------------------------------^
single_point_streaming_stats.F90(30): error #5082: Syntax error, found IDENTIFIER 'FUNCTION' when expecting one of: ( % [ : . = =>
 IS_PURE function spss_op_real(lhs,rhs) result(res)
-------------^
single_point_streaming_stats.F90(30): error #5082: Syntax error, found IDENTIFIER 'RESULT' when expecting one of: ( * ) :: , <END-OF-STATEMENT> ; . % (/ + - [ : ] /) . ' ** / ...
 IS_PURE function spss_op_real(lhs,rhs) result(res)
--------------------------------------------^
single_point_streaming_stats.F90(30): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: :
 IS_PURE function spss_op_real(lhs,rhs) result(res)
-------------------------------------------------------^
single_point_streaming_stats.F90(36): error #5082: Syntax error, found IDENTIFIER 'FUNCTION' when expecting one of: ( % [ : . = =>
 IS_PURE function spss_op_realvec(lhs,rhs) result(res)
-------------^
single_point_streaming_stats.F90(36): error #5082: Syntax error, found IDENTIFIER 'RESULT' when expecting one of: ( * ) :: , <END-OF-STATEMENT> ; . % (/ + - [ : ] /) . ' ** / ...
 IS_PURE function spss_op_realvec(lhs,rhs) result(res)
-----------------------------------------------^
single_point_streaming_stats.F90(36): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: :
 IS_PURE function spss_op_realvec(lhs,rhs) result(res)
----------------------------------------------------------^
single_point_streaming_stats.F90(42): error #5082: Syntax error, found IDENTIFIER 'SUBROUTINE' when expecting one of: ( % [ : . = =>
 IS_ELEMENTAL subroutine spss_eq_spss(lhs,rhs)
------------------^
single_point_streaming_stats.F90(47): error #5082: Syntax error, found IDENTIFIER 'SUBROUTINE' when expecting one of: ( % [ : . = =>
 IS_PURE subroutine spss_eq_real(lhs,mean) ! constructor of sorts
-------------^
single_point_streaming_stats.F90(42): error #6622: This statement is invalid in an INTERFACE block.
 IS_ELEMENTAL subroutine spss_eq_spss(lhs,rhs)
-----^
single_point_streaming_stats.F90(47): error #6622: This statement is invalid in an INTERFACE block.
 IS_PURE subroutine spss_eq_real(lhs,mean) ! constructor of sorts
-----^
single_point_streaming_stats.F90(26): error #8041: The IMPORT statement is not positioned correctly within the scoping unit.
 import :: spss_t
-------^
single_point_streaming_stats.F90(27): error #6643: This statement is incorrectly positioned.
 class(spss_t) ,intent(in) :: lhs, rhs
-------^
single_point_streaming_stats.F90(28): error #6643: This statement is incorrectly positioned.
 class(spss_t), allocatable :: res
-------^
single_point_streaming_stats.F90: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.

Also, note that the pre-processor directives are valid as far as I can tell, and produce no complaints when fpp is run first.

Thanks, -Z

-Zaak
11 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

You need to supply the -fpp option for ifort to invoke the preprocessor. (it is not on by default as with C/CPP)

Jim Dempsey

www.quickthreadprogramming.com

On Linux/OS X, the use of the .F90 file type (as opposed to .f90) automatically runs fpp.

Z, thanks, we'll take a look.

Steve Intel Developer Support

I reproduced and escalated both problems. The ICE is issue DPD200243576, the failure to run fpp when -syntax-only is specified is DPD200243577.

Steve Intel Developer Support

Thanks Steve.

Jim, the Composer XE 2013 2.146 man pages make no reference to an -fpp option. The -E flag will just run the preprocessor and output the results of preprocessing to stdout, but then -warn and -syntax-only are not run AFAICT.

-Zaak

The man pages don't list all options. If you add -fpp, it works. You shouldn't have to do that, though, which is a bug.

Steve Intel Developer Support

A fix has been found for both DPD200243576 and DPD200243577. We are planning to include these fixes in the next major release which is currently scheduled for later this year.

Thanks for the hard work and first class support.

-Zaak

Dear All,

I am new in linux and ifort and I have exactly the same problem that when I want to compile the code I receive the error:

OCNGISSVM.f(4): warning #5117: Bad # preprocessor line #include "rundeck_opts.h"

As I am new I don't know how to supply the -fpp option for ifort to invoke the preprocessor. Please can you help me where to change it, 

as anybody cannot help me, thanks

Anna,

You have two choices. One is to find the place in your makefile or other build script where ifort is invoked and add -fpp to the list of compiler options. The other is to rename the source file to have a file type of .F90 (or .F if fixed-form source) with a capital letter F.

Steve Intel Developer Support

Anna,

It would be useful to know more about your build system, but I'll try to answer based on what you've included here.

When you compile OCNGISSVM.f you should add the -fpp option to ifort:

 ifort -fpp <other compile and/or linker options> OCNGISSVM.f 

How is the program built? Are you calling ifort directly or typing `make <exe/target name>`? Is OCNGISSVM.f just one of many source files needed to build your program or do you compile and link it in one step since it is the only source file, other than the #includes? Another alternative would be to stop relying on preprocessor includes and use the native Fortran include statement, however this is deprecated since at least F2008:

C     ! original
#include rundeck_opts.h
C     ! change to:
      INCLUDE "rundeck_opts.h"

If you keep the original #include preprocessor directive (the best option IMO) you may consider changing the extension on the file name from OCNGISSVM.f to OCNGISSVM.F, since it is a common convention that Fortran source files that require pre-processing use a capital "F" instead of lowercase in the file name extension. (e.g. .F instead of .f or .F90 instead of .f90) You can do this with the `mv` command:

 mv OCNGISSVM.f OCNGISSVM.F

-Zaak

Melden Sie sich an, um einen Kommentar zu hinterlassen.