- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I have been trying out parameterized data types just to see how they work when passed to subroutines.
Then I thought I should use ASSOCIATE to get shorter names to work with.
That worked as expected in the main program, but not in the subroutine.
The type is:
TYPE :: MATRISE(K, M, N)
INTEGER, KIND :: K = WP
INTEGER, LEN :: M = 3
INTEGER, LEN :: N = 4
REAL (K), DIMENSION(M, N) :: A
END TYPE MATRISE
Declaration in the main program
TYPE (MATRISE(WP, 4, 1)) :: B
and the associate in the main program is
ASSOCIATE(MAT => B % A)
ASSOCIATE(MAT => B % A)
and this makes MAT equal to the whole matrix A, but not so when this sentence is used in a subroutine,
then the result is a zero sized matrix.
Is this a bug or to be expected?
then the result is a zero sized matrix.
Is this a bug or to be expected?
Please see the attached program.
I use
Intel(R) Compiler 17.0 Update 5 (package 267)
Regards
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
.. not so when this sentence is used in a subroutine, then the result is a zero sized matrix. Is this a bug .. ?
Yes, it looks like a bug and it's present with Intel Fortran 18.0 update 1 as well. As you may know, a support request at the Intel Online Service Center (OSC) will be the way to proceed:
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
.. not so when this sentence is used in a subroutine, then the result is a zero sized matrix. Is this a bug .. ?
Yes, it looks like a bug and it's present with Intel Fortran 18.0 update 1 as well. As you may know, a support request at the Intel Online Service Center (OSC) will be the way to proceed:
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