- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
the following code crashes at runtime with ifort/ifx:
program p
implicit none
class(*), allocatable :: x(:)
x = foo()
call prt (x)
deallocate (x)
! up to here all is fine...
associate (var => foo())
call prt (var) ! <- crash here
end associate
contains
function foo() result(res)
class(*), allocatable :: res(:)
res = [42]
end
subroutine prt (x)
class(*), intent(in) :: x(:)
select type (x)
type is (integer)
print *, x
class default
stop 99
end select
end
end
I get:
ifx intel-associate-unlim-poly.f90 -g -traceback && ./a.out
ifx: remark #10440: Note that use of a debug option without any optimization-level option will turnoff most compiler optimizations similar to use of '-O0'
42
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libpthread-2.31.s 00007FF2B7937910 Unknown Unknown Unknown
a.out 0000000000404D58 prt 18 intel-associate-unlim-poly.f90
a.out 00000000004049AE p 9 intel-associate-unlim-poly.f90
a.out 000000000040425D Unknown Unknown Unknown
libc-2.31.so 00007FF2B775824D __libc_start_main Unknown Unknown
a.out 000000000040418A Unknown Unknown Unknown
The code works just fine with NAG.
Thanks,
Harald
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is an interesting testcase. Gfortran 13.0 gets an ICE just trying to compile it.
the runtime crash by ifx is a bug. We'll get a bug report created for this case. Thanks @Harald1 for sending this to us.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the bug ID is CMPLRLLVM-55090
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Harald1 this bug is fixed in the 2024.1.0 compiler. I just confirmed the fix in the released compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmmm, it still crashes at runtime here with the exact same traceback as given in the original post:
% ifx intel-associate-unlim-poly.f90 -g -traceback -V && ./a.out
Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2024.1.0 Build 20240308
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.
ifx: remark #10440: Note that use of a debug option without any optimization-level option will turnoff most compiler optimizations similar to use of '-O0'
Intel(R) Fortran 24.0-1472.3
GNU ld (GNU Binutils; SUSE Linux Enterprise 15) 2.41.0.20230908-150100.7.46
42
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libpthread-2.31.s 00007FF0450B4910 Unknown Unknown Unknown
a.out 0000000000404D68 prt 18 intel-associate-unlim-poly.f90
a.out 00000000004049BE p 9 intel-associate-unlim-poly.f90
a.out 000000000040426D Unknown Unknown Unknown
libc-2.31.so 00007FF044ED724D __libc_start_main Unknown Unknown
a.out 000000000040419A Unknown Unknown Unknown
Has it been fixed in a version newer than this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ooppps! There's a typo in the "Fixed Version" field of the bug report. This one is fixed in 2024.2 that is planned for mid 2024.
Sorry for the misinformation.
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page