- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ifx miscopiles when passing the real or complex part of an explicit shape array to a procedure
Ifort instead provides the expected output
Notice that I have specified the intent(in)
When i specify any other intent ifx crashes
main.f90
program main
complex :: x(3)
x(1)%re = 1
x(2)%re = 2
x(3)%re = 3
x(1)%im = 4
x(2)%im = 5
x(3)%im = 6
write(*,*) x
call foo(x%re)
call foo(x%im)
contains
subroutine foo(x)
real, intent(in) :: x(3)
write(*,*) "x", x
end subroutine
end program
ifx main.f90; ./a.out
(1.000000,4.000000) (2.000000,5.000000) (3.000000,6.000000)
x 1.000000 4.000000 2.000000
x 1.000000 4.000000 2.000000
ifort instead provides the correct output
ifort main.f90; ./a.out
(1.000000,4.000000) (2.000000,5.000000) (3.000000,6.000000)
x 1.000000 2.000000 3.000000
x 4.000000 5.000000 6.000000
ifx crash without specifying intent(in):
main.f90(1): error #5623: **Internal compiler error: internal abort** 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.
program main
^
compilation aborted for main.f90 (code 3)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fix for this issue will be included in the future 2025 ifx
$ ifx f10.f90 -o f10 -what && ./f10 Intel(R) Fortran xxxxxxx (1.000000,4.000000) (2.000000,5.000000) (3.000000,6.000000) x 1.000000 2.000000 3.000000 x 4.000000 5.000000 6.000000
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
@WiserOrb wrote:Ifx miscopiles when passing the real or complex part of an explicit shape array to a procedure
Ifort instead provides the expected output
Notice that I have specified the intent(in)
When i specify any other intent ifx crashes
main.f90
program main
complex :: x(3)
x(1)%re = 1
x(2)%re = 2
x(3)%re = 3
x(1)%im = 4
x(2)%im = 5
x(3)%im = 6
write(*,*) x
call foo(x%re)
call foo(x%im)
contains
subroutine foo(x)
real, intent(in) :: x(3)
write(*,*) "x", x
end subroutine
end program
ifx main.f90; ./a.out
(1.000000,4.000000) (2.000000,5.000000) (3.000000,6.000000)
x 1.000000 4.000000 2.000000
x 1.000000 4.000000 2.000000
ifort instead provides the correct output
ifort main.f90; ./a.out
(1.000000,4.000000) (2.000000,5.000000) (3.000000,6.000000)
x 1.000000 2.000000 3.000000
x 4.000000 5.000000 6.000000
ifx crash without specifying intent(in):
main.f90(1): error #5623: **Internal compiler error: internal abort** 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.
program main
^
compilation aborted for main.f90 (code 3)
Something's wrong with your computer program.
It's like trying to put together a puzzle with missing pieces. Let's figure out how to fix it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe ifx doesn't pass the correct stride to the subroutine.
If we assume ifx packs complex numbers with alternating real and imaginary part the x vector has flat an in memory representation:
[1, 4, 2, 5, 3, 6]
When I pass the real part of the array, ifx should pass an array with stride 2 starting from the first entry of the array
[1, _, 2, _, 3, _]
However i think ifx is setting the stride to one, so the subroutine sees:
[1, 4, 2]
Then there is the compiler crash when I'm not specifying `intent(in)` in the subroutine, but I cant debug it without access to the ifx source code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this to us. I have escalated this issue to our compiler engineering team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fix for this issue will be included in the future 2025 ifx
$ ifx f10.f90 -o f10 -what && ./f10 Intel(R) Fortran xxxxxxx (1.000000,4.000000) (2.000000,5.000000) (3.000000,6.000000) x 1.000000 2.000000 3.000000 x 4.000000 5.000000 6.000000
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page