- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I am creating a program in Fortran90.
"Forrtl: severe (174): SIGSEGV, segmentation fault occurred" occurs in an array in a structure.
I tried to check the index by writing a print statement to identify the cause, but the error disappeared when I wrote the print statement for some reason. Also, when I added -check bounds, the error disappeared as well.
The compiler used intel Fortran, and an error occurred at that time, but when using gfortran, no error occurred.
If you know the cause, can you tell me?
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very likely there is a flaw in your code. Could you post the code? The segmentation fault most likely happens because you are trying to access some part of memory that is not allocated. The print statement might counteract that, e.g. because the compiler/optimizer does not inline some part of the code.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page