- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
rimu[~]$ cat testbitsize.f90
print *, (/bit_size(1_8),huge(1_8)/)
print *, bit_size(1_8),huge(1_8)
end
rimu[~]$ ifort -V testbitsize.f90
Intel Fortran Compiler Professional for applications running on IA-32,
Version 11.1 Build 20090630 Package ID: l_cprof_p_11.1.046
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
Intel Fortran 11.1-2536
testbitsize.f90(1): warning #6384: The INTEGER(KIND=4) value is
out-of-range.
print *, (/bit_size(1_8),huge(1_8)/)
-------------------------^
GNU ld version 2.17.50.0.6-14.el5 20061020
rimu[~]$ ./a.out
64 -1
64 9223372036854775807
rimu[~]$
-- John Harper
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you reporting this defect, John. It appears HUGE used in an array constructor returns an incorrect value. It does appear to function correctly in uses outside the array constructor, one which you showed. I reported this to Development (see internal tracking # below) and will update with new information as I learn it.
(Internal tracking id: DPD200159466)
(Resolution Update on 9/30/2012): This issue is resolved in the Intel® Fortran Compiler XE 2013 release (2013.0.079 – Linux).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bit_size(1_8) returns an integer (INT4), huge(1_8) returns an INT8.
(/val1,val2/) now has two different types
What would you expect for
print*,(/1,2.3,'abc'/)
Try
print *, (/INT8(bit_size(1_8)),huge(1_8)/) ! should work
and
print *, (/INT8(bit_size(1_8)),INT8(huge(1_8))/) ! explicit of what you want
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good, then this would seem to indicate that the error may be in "bit_size" returning integer and not integer of same kind as integer argument.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Must be something else.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Development's assessment is the compiler front-end does not properly recognize the kind parameter in the array constructor.
(Resolution Update on 9/30/2012): This issue is resolved in the Intel® Fortran Compiler XE 2013 release (2013.0.079 – Linux).
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page