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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [entry_array_specs_2.f] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
! { dg-do run }
! { dg-do run }
! Tests the patch for PR30025, aka 25818, in which the initialization
! Tests the patch for PR30025, aka 25818, in which the initialization
! code for the array a, was causing a segfault in runtime for a call
! code for the array a, was causing a segfault in runtime for a call
! to x, since n is missing.
! to x, since n is missing.
!
!
! COntributed by Elizabeth Yip <elizabeth.l.yip@boeing.com>
! COntributed by Elizabeth Yip <elizabeth.l.yip@boeing.com>
      program test_entry
      program test_entry
      common // j
      common // j
      real a(10)
      real a(10)
      a(1) = 999.
      a(1) = 999.
      call x
      call x
      if (j .ne. 1) call abort ()
      if (j .ne. 1) call abort ()
      call y(a,10)
      call y(a,10)
      if (j .ne. 2) call abort ()
      if (j .ne. 2) call abort ()
      stop
      stop
      end
      end
      subroutine x
      subroutine x
      common // j
      common // j
      real a(n)
      real a(n)
      j = 1
      j = 1
      return
      return
      entry y(a,n)
      entry y(a,n)
      call foo(a(1))
      call foo(a(1))
      end
      end
      subroutine foo(a)
      subroutine foo(a)
      common // j
      common // j
      real a
      real a
      j = 2
      j = 2
      return
      return
      end
      end
 
 
 
 

powered by: WebSVN 2.1.0

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