- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel 2021.5.0 rejects the following code - which is accepted by NAG:
program p
integer, parameter :: a(*) = [1]
print *, [ real :: + a ] ! OK
print *, [ real :: +[a] ] ! rejected
print *, [ real :: +[1] ] ! rejected
end
The compiler gives:
ifort-nested-ctor.f90(4): error #8209: If type specification is omitted, each element in an
array-constructor must have the same type and kind type parameters.
print *, [ real :: +[a] ] ! rejected
---------------------^
ifort-nested-ctor.f90(5): error #8209: If type specification is omitted, each element in an
array-constructor must have the same type and kind type parameters.
print *, [ real :: +[1] ] ! rejected
---------------------^
compilation aborted for ifort-nested-ctor.f90 (code 1)
Somehow the unary + sign in front of the constructor confuses the compiler.
Thanks,
Harald
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank for reporting this with such a small reproducer. We appreciate that!
I filed a bug report, CMPLRIL0-34589. I'll let you know its progress to a fix.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank for reporting this with such a small reproducer. We appreciate that!
I filed a bug report, CMPLRIL0-34589. I'll let you know its progress to a fix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue with the erroneous error message is fixed in ifx 2023.0.0 and ifort 2021.8.0 that were released in December as part of the oneAPI HPC Toolkit. Please check it out!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it is indeed fixed. Thanks!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page