http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54072

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-23 
13:17:33 UTC ---
Currently, gfortran prints the following error message if the BOZ exceeds (for
integers) the positive value:

Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1). This
check can be disabled with the option -fno-range-check 


That perfectly matches the behaviour of Fortran 95, which had:

"If a data-statement-constant is a boz-literal-constant, the corresponding
object shall be of type integer. A data-stmt-constant that is a
boz-literal-constant is treated as if the constant were an int-literalconstant
with a kind-param that specifies the representation method with the largest
decimal exponent range supported by the processor."


I am not sure that the message text is the best for Fortran 2008, which has for
DATA:

"If a data-stmt-constant is a boz-literal-constant, the corresponding variable
shall be of type integer. The boz-literal-constant is treated as if it were
converted by the intrinsic function INT (13.7.81) to type integer with the kind
type parameter of the variable"

And for INT see the text quoted in comment 0, i.e. it is "is processor
dependent".

Reply via email to