This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: The test case integer_exponentiation_2.f90 is not standard conforming
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "Dominique Dhumieres" <dominiq at lps dot ens dot fr>
- Cc: fortran at gcc dot gnu dot org
- Date: Mon, 26 Mar 2007 13:39:26 +0200
- Subject: Re: The test case integer_exponentiation_2.f90 is not standard conforming
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oJw2iUVm/zZDI2wVKotLvEbGPv9sgKvwj9gIP6h/CWgLFaPEMR0g8DX4Ajhw5tCQor4cWzo/9qtAy9RboF129vw4lCOyLfKYfLW5pdzepzcxK0o1p2uj6JRT2Y+5moD2PCPsn0DCSaF6fvLzR3HsGjU5jXM1/dNyiCfr4molLw8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Sf6yKpFphEDi5wHsJ/d/AGuxbIbfxZU0c6tAVuS/YHgU8MKAF7p2VYcqjULRzJZ2xNL1DlRAtBR6qW3GWnuJ+bgkFfpCkfheJeegD6XFijsfPjVdFP3gQQRJHBBrqEH0biqcFN/R4oqgyQGSVMkFnXnKlbOOhn+x7MT/OLf2+GY=
- References: <20070326085023.A9DE95BE0E@mailhost.lps.ens.fr>
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