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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [nullify_3.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 "-O0 -fbounds-check" }
3
! Tests patch for PR29371, in which the null pointer
4
! assignment would cause a segfault with the bounds
5
! check on.
6
!
7
! Contributed by Tobias Burnus 
8
!
9
program test
10
  implicit none
11
  type projector_t
12
    real,   pointer :: ket(:, :), bra(:, :)
13
  end type projector_t
14
 
15
  type(projector_t),pointer, dimension(:) :: p
16
  integer :: stat,i
17
  allocate(p(2),stat=stat)
18
  do i = 1, 2
19
        nullify(p(i)%bra)
20
        nullify(p(i)%ket)
21
  end do
22
  do i = 1, 2
23
        if (associated (p(i)%bra)) call abort ()
24
        if (associated (p(i)%ket)) call abort ()
25
  end do
26
end program

powered by: WebSVN 2.1.0

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