Programs such as

real(4) :: pi, a(2), b(3)
pi = acos(-1.0)
b = pi
a = cos(b)
a = -pi
b = cos(a)
print *, b
end

does not report errors. It should give

In file conform_1.f90:4

a = cos(b)
       1
Error: Array assignment at (1) has different shape on dimension 1 (2/3)
In file conform_1.f90:6

b = cos(a)
       1
Error: Array assignment at (1) has different shape on dimension 1 (3/2)

Dominique


-- 
           Summary: Array assignment of elemental intrinsic functions does
                    not check conformability
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr


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

Reply via email to