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

Possible compiler bug

halvor
Beginner
736 Views
Dear ifort developers

I understood it such that this forum is the place to submit (possible) bug reports?

I have discovered a segmentation fault that occurs when compiling our fortran software with ifort 11.0.081

I have identified at which source line the segmentation fault occurs but
there seems (to my knowledge) nothing wrong in the source code, thus I suspect this to be a compiler bug.

The failing compiling options are -O3 -no-prec-div -xHost -static -heap-arrays
The segmentation fault disappears by adding checks to the problematic routine, e.g.
-CB -O3 -no-prec-div -xHost -static -heap-arrays

or the adding the compiling option -no-ansi-alias.

I find this behaviour somehow odd and I am wondering the following:
1. What can be the source of this problem
2. Is this a compiler problem or a source code problem? And if a source code problem: How can I remove this problem?

The code compiles and runs without problem with sun,pgf and gfortran compilers.

I can give you a copy of the source code if you are interested in exploring the problem further.


Best regards, Halvor

0 Kudos
1 Solution
TimP
Honored Contributor III
736 Views
For a public discussion, you could attach the case here, or submit a private problem report on premier.intel.com.
-no-ansi-alias would tell the compiler not to assume you have followed the Fortran rules against overlapping argument arrays, when one of them is INTENT (INOUT) (default) or (OUT), or overlap between COMMON and arguments. If you did violate that rule, you would require such an option. It would be simply a matter of luck whether such a violation caused problems with another compiler.

View solution in original post

0 Kudos
2 Replies
TimP
Honored Contributor III
737 Views
For a public discussion, you could attach the case here, or submit a private problem report on premier.intel.com.
-no-ansi-alias would tell the compiler not to assume you have followed the Fortran rules against overlapping argument arrays, when one of them is INTENT (INOUT) (default) or (OUT), or overlap between COMMON and arguments. If you did violate that rule, you would require such an option. It would be simply a matter of luck whether such a violation caused problems with another compiler.
0 Kudos
halvor
Beginner
736 Views
Thanks for the reply, I figured out the problem with the help of your comments. I was reallocating a data structure inside a subroutine and including it directly from a module with USE

When I send the structure through the subroutine call() instead of via USE everything works fine.



Quoting - tim18
For a public discussion, you could attach the case here, or submit a private problem report on premier.intel.com.
-no-ansi-alias would tell the compiler not to assume you have followed the Fortran rules against overlapping argument arrays, when one of them is INTENT (INOUT) (default) or (OUT), or overlap between COMMON and arguments. If you did violate that rule, you would require such an option. It would be simply a matter of luck whether such a violation caused problems with another compiler.

0 Kudos
Reply