Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

32 bit Truncation Warning

rahzan
New Contributor I
599 Views
I know that I've asked this before but the problem persists.

on the use of constants like from DFWINTY
STATUS_ARRAY_BOUNDS_EXCEEDED

I get the Warning:
Case selection values must fit within a signed 32 bit integer.

Now I've had this problem before and following Jugoslav's suggestion I recompiled the f90 file (DFWINTY.f90) under CVF6.6B and it went away. However, this trick did not work this time, and the warnings persist.

I'd apprecaite any other hints on removing these warnings.

Duh...Tim
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
599 Views
OK, this time I wasn't lazy to try it myself. And I got the same result. Sorry for questioning your sanity :-(.

My earlier suggestion was pointed to backward .mod compatibility CVF bug. But it's something fishy going on even in 6.6B. The culprit seems to be the definition of

integer, parameter :: STATUS_INVALID_DISPOSITION = ( #C0000026)

This is actually a negative number (-1073741684) and CVF doesn't like something when it performs type conversion. It looks as if it internally treats #C0000026 as an unsigned number and warns you when it's converted to a signed value -- the only one that Fortran has.
The bit-pattern is preserved, so it seems harmless, i.e. the code works. Any comments Steve?

I'd guess it wouldn't happen if such PARAMETERs were defined using negative decimal numbers, not hex constants. But it's ugly.

Jugoslav
0 Kudos
Steven_L_Intel1
Employee
599 Views
Yes, if this was defined using a decimal number, it would be happier. I think the warning is the only problem here, but it is a nuisance...

Steve
0 Kudos
Reply