This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The test case integer_exponentiation_2.f90 is not standard conforming


I think the test case integer_exponentiation_2.f90 is not standard conforming
on two counts

Note that all testcases aren't standard conforming. They're here to test the validity of gfortran, which accepts invalid code as extensions.

(1) when compiled with -std=f95, the result is

integer_exponentiation_2.f90:34.26:

  call check_equal_r (a**-1.0, 1/a)
                         1
Error: Extension: Unary operator following arithmetic operator (use parentheses) at (1)

This is one case, and it's the reason why there's a { dg-options "" } directive, so that -pedantic is not passed to the compiler. We also use integers in asymetric integer range, which is not guaranteed by the standard but is always accepted by gfortran.

(2) i**cst_8 (cst is a constant 1, 2, ...) is kind(8) and is passed as the
argument of a procedure expecting a kind(4) integer.  This is minor since
the gee_i is not actually used in the test, but this could be a problem
if the test is extended in the future to actually use this part of the code.

That one is a real problem. We need to add variant of the function, and an interface.

FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]