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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [reshape_order_2.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fbounds-check" }
3
! { dg-shouldfail "Value 3 out of range in ORDER argument to RESHAPE intrinsic" }
4
program main
5
  implicit none
6
  integer(kind=1), dimension(6) :: source1 = (/ 1, 2, 3, 4, 5, 6 /)
7
  integer, dimension(2) :: shape1 = (/ 2, 3/)
8
  integer(kind=1), dimension(2) :: pad1 = (/ 0, 0/)
9
  character(len=200) :: l1, l2
10
  integer :: i1, i2
11
 
12
  l1 = "3 2"
13
  read(unit=l1,fmt=*) i1, i2
14
  write (unit=l2,fmt=*) reshape(source1, shape1, pad1, (/i1, i2/)) ! Invalid
15
end program main
16
! { dg-output "Fortran runtime error: Value 3 out of range in ORDER argument to RESHAPE intrinsic" }

powered by: WebSVN 2.1.0

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