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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [array_temporaries_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 "-fcheck-array-temporaries" }
3
 program test
4
  implicit none
5
  integer :: a(3,3)
6
  call foo(a(:,1))  ! OK, no temporary created
7
  call foo(a(1,:))  ! BAD, temporary var created
8
contains
9
  subroutine foo(x)
10
    integer :: x(3)
11
    x = 5
12
  end subroutine foo
13
end program test
14
 
15
! { dg-output "At line 7 of file .*array_temporaries_2.f90(\n|\r\n|\r)Fortran runtime warning: An array temporary was created for argument 'x' of procedure 'foo'" }

powered by: WebSVN 2.1.0

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