- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even the most underwhelming Christmas present needs wrapping
print *, [[integer::]] end
But on Linux, ifort 16,17,18,19(.0.3):
error #7203: An ac-value-list of an array-constructor must contain at least one ac-value. print *, [[integer::]]
Also gfortran 9.1.0:
1 | print *, [[integer::]] | internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:1120
Nobody likes underwhelming Christmas presents.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very interesting as Sgt Schultz would have said.
I suggest another beer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Peculiar. The extra set of brackets seems to be the key here. Note that this isn't specifying a rank-two array, since:
If an ac-value is a scalar expression, its value specifies an element of the array constructor. If an ac-value is an array expression, the values of the elements of the expression, in array element order (9.5.3.2), specify the corresponding sequence of elements of the array constructor.
Both compilers are wrong here, in different ways. Please report this to Intel using the Online Service Portal You can report it on Bugzilla against gfortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah, it is an interesting (...but also stupid) case, as the outer 'wrapping' brakets are pretty useless. I have reported it nevertheless. Thanks.
PS: concerning gfortran, this bug was reported in 2015 here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65428
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been seeing gripes from the few remaining gfortran developers that a lot of old, lower-priority bugs aren't getting worked on because there's no one to do so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your report. This case has been escalated to compiler engineering.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve:
What should it have done?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It should have printed a blank line since the I/O list was an empty (zero-element) array. The code shown is functionally identical to:
print *, [integer::] end
(Note only one set of brackets.) This is a zero-element array of default integer type/kind.
To make it a bit more obvious:
print *, [integer::[1,2,3],4,5] end
should print:
1 2 3 4 5
(ignoring spacing)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page