- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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).
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Must be something else.
Jim
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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).
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable