This is a follow up to PR 30814 (which implemented a run-time check).

The following test case should rise a compile-time error:

NAG f95:
  Error: a.f90, line 3: Different vector lengths (19 and 30)
ifort:
  Error: a.f90, line 3: The shapes of the array expressions do not
conform.   [NEIGHBRS]
sunf95:
  ERROR: The left and right hand sides of this array syntax assignment
must be conformable arrays.
openf95:
  The left and right hand sides of this array syntax assignment must be
conformable arrays.

program test
integer :: it, neighbrs(var)
neighbrs = pack( (/ ( it, it=1, 30 ) /),   (/ ( it, it=1, 30 ) /) < 3, &
                 (/ ( 0, it=1, 30 ) /) )
end program test


-- 
           Summary: Compile-time detect of LHS/RHS missmatch for PACK
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 27766
             nThis:


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

Reply via email to