This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/31929] New: atan2 accepts non-conforming array shapes


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


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