- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the program i pass the real part of a component of a structure to the subroutine foo that set a value
However the matrix A is not changed by the procedure call
If I pass a matrix that is NOT a component, it correctly modifies it
main.f90
program main
type :: Bar
complex(kind=8) :: A(2)
end type
type(Bar) :: x
x%A%re = 1.0_8
x%A%im = 2.0_8
call foo(3.0_8, x%A%re)
write (*,*) x%A
contains
subroutine foo(v, A)
real(kind=8) :: v, A(:)
integer(kind=4) :: i
A = v
write(*,*) A
end subroutine
end program
Output of ifx version 2025.1.1
3.00000000000000 3.00000000000000
(1.00000000000000,2.00000000000000) (1.00000000000000,2.00000000000000)
The output should be:
3.00000000000000 3.00000000000000
(3.00000000000000,2.00000000000000) (3.00000000000000,2.00000000000000)
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can reproduce the error and will open a bug report for it.

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