- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm reporting here a simple case in which the Intel Fortran compiler crashes:
This is the program:
$ cat sample.f90
REAL(8) UNO
PRINT *, UNO()
END
FUNCTION UNO()
REAL(8) UNO
UNO = 1.D0
CALL DUE
RETURN
CONTAINS
SUBROUTINE DUE
UNO = 2.D0
RETURN
END SUBROUTINE DUE
END
Then :
$ ifort -logo -c -fp-model strict -save sample.f90
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1
Build 20091012 Package ID: l_cprof_p_11.1.059
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
Intel Fortran 11.1-2620
: 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.
compilation aborted for sample.f90 (code 3)
Note that building without any compiler option, it works fine :
$ ifort sample.f90 -o sample && sample
2.00000000000000
It also works when not using -fp-model strict and -save together.
Then, it seems that the combined effect of this two options (which I use without problems on other source) causes the crash.
If the problem is related to the use of the name of the containing function in the contained subroutine, then I guess the compiler should point this out, instead of crashing ...
Regards
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting - looks like -fp-model strict is working in combination with -save on this bug. Compiling without -fp-model and only -save doesn't invoke the error.
I'll get a bug report started.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may have noticed that -fp-model precise or -fp-model source avoid the error. You could work around the error with:
-save -fp-model precise -prec-div -prec-sqrt -nolib-inline
which should give you good numerical stability and SAVE.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I noticed that the error occurs when using both -fp-model strict and -save and not when using only one of them (see the first post).
I need -fp-model strict because I need to change the floating point exception trapping behavior during the program execution; and the documentation says that that is a necessary flag, for such a purpose, if I remember well.
I will try not to use -save when not really needed (for sure it is better to use the SAVE statements in the code, and only for the variables that need it : I do not like depending on compiler options if not necessary).
I came across the compiler bug while moving a legacy application towards the more recent standard, also using CONTAINS for a better programming style, and I thought it was worth point it out to make Intel improve the compiler robustness.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This bug was fixed some time ago in 12.x compilers and newer.
closing. Thanks for sending this in to us.
ron

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page