- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The following test program illustrate a crash due to segfault when the program is compiled with Intel Fortran compiler.
[fortran]program UnlimitedPolymorphicRead !-- The following code demonstrate Intel Fortran compiler bug in reading ! to unlimited polymorphic variable character ( 10 ) :: StringValue class ( * ), allocatable :: Value StringValue = '12345' allocate ( integer :: Value ) select type ( Value ) type is ( integer ) !-- The following line crashes with ifort 12.1.2 build 20111128 read ( StringValue, fmt = '(i10)' ) Value print*, 'Integer Value', Value end select end program UnlimitedPolymorphicRead [/fortran] Running the program gives me the following error:
[plain]}$ ifort -V Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.1 Build 20111128 ]$ ifort -g -O0 UnlmtdPolyRead.f90 ]$ gdb ./a.out ... (gdb) run Starting program: ./UnlmtdPolyRead/a.out [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x000000000044de5c in cvt_text_to_integer () (gdb) backtrace #0 0x000000000044de5c in cvt_text_to_integer () #1 0x000000000042df97 in for__cvt_value () #2 0x000000000040827e in for_read_int_fmt_xmit () #3 0x0000000000406ac7 in for_read_int_fmt () #4 0x0000000000402de4 in unlimitedpolymorphicread () at UnlmtdPolyRead.f90:16 #5 0x0000000000402abc in main () [/plain] The same code compiles and runs fine with PGI 12.2 compiler and Cray's compiler, so I believe this is Intel's bug.
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are planing to include a fix for this issue in a future release scheduled for later this year.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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