- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel compiler accepts the following code silently:
program p
type t
integer :: i = 1
end type t
type(t), parameter :: a = t() ! Legal
class(t), parameter :: b = t() ! Likely not
class(*), parameter :: c = t() ! Likely not
class(*), parameter :: d = 1 ! Likely not
end
I've been informed that F2018 disallows the marked lines:
C708 An entity declared with the CLASS keyword shall be a dummy argument or have the ALLOCATABLE or POINTER attribute.
Is this due to a missing check in the compiler, or am I missing something?
Thanks,
Harald
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Both ifx and ifort are printing error messages now! Please check out 2024.1 that was released last week.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
C708 An entity declared with the CLASS keyword shall be a dummy argument or have the ALLOCATABLE or POINTER attribute.
PARAMETER is right out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for bringing this up. I filed a bug report for both ifort and ifx, CMPLRLLVM-37714.
This will be a two-for-1 fix, a 2-fer, since they share the Fortran Front End.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Both ifx and ifort are printing error messages now! Please check out 2024.1 that was released last week.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is fixed indeed. Great, thanks!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page