OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [pack_bounds_1.f90] - Rev 551

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do run }
! { dg-options "-fbounds-check" }
! { dg-shouldfail "Incorrect extent in return value of PACK intrinsic; is 4, should be 5" }
! PR 30814 - a bounds error with pack was not caught.
program main
  integer :: a(2,2), b(5)
  a = reshape((/ 1, -1, 1, -1 /), shape(a))
  b = pack(a, a /= 0)
end program main
! { dg-output "Fortran runtime error: Incorrect extent in return value of PACK intrinsic; is 4, should be 5" }

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.