This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31929] New: atan2 accepts non-conforming array shapes
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 May 2007 08:16:24 -0000
- Subject: [Bug fortran/31929] New: atan2 accepts non-conforming array shapes
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code is invalid as shapes of X and Y are not identical:
$> cat atan2.f90
real :: x(3), y(2) ! same rank but different shapes
x = atan2(x,y)
end
$> gfortran-svn -fdump-tree-original atan2.f90
$> cat atan2.f90.003t.original
MAIN__ ()
{
real4 y[2];
real4 x[3];
_gfortran_set_std (68, 127, 0, 0, 0);
{
int4 S.0;
S.0 = 1;
while (1)
{
if (S.0 > 3) goto L.1;
x[S.0 + -1] = __builtin_atan2f (x[S.0 + -1], y[S.0 + -1]);
S.0 = S.0 + 1;
}
L.1:;
}
}
$> gfortran-svn -v
gcc version 4.3.0 20070502 (experimental)
--
Summary: atan2 accepts non-conforming array shapes
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: dfranke at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31929