- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all
I think this code should compile:
Module modparadt Type, public :: xx(k) Integer, kind :: k integer(k), allocatable :: v(:) End type xx End Module modparadt Program Test use modparadt Type(xx(8)), pointer :: yy=>null() end Program Test
but when using ifort 17.07 and ifort 18.03 it stops with
tmp.f90(9): error #6197: An assignment of different structure types is invalid. [YY] Type(xx(8)), pointer :: yy=>null()
any comments. If this is a bug I'll launch a ticket pointing to this theard.
cheers
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Indeed, this compiles and runs with PGI 18.5, gfortran 9.0.0 (experimental) and nagfor 6.2 without any problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I too think it is a bug in Intel Fortran. And it persists in 19.0 Beta Update 1 as well.
For whatever it's worth, the following change where the initialization of the object in the declaration is replaced with a separate pointer assignment instruction. Intel Fortran compiles the code ok:
type(xx(k=8)), pointer :: yy yy => null()

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