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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [alloc_comp_assign_9.f90] - Blame information for rev 399

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! Test the fix for PR39519, where the presence of the pointer
3
! as the first component was preventing the second from passing
4
! the "alloc_comp" attribute to the derived type.
5
!
6
! Contributed by Gilbert Scott 
7
!
8
PROGRAM X
9
  TYPE T
10
    INTEGER, POINTER :: P
11
    INTEGER, ALLOCATABLE :: A(:)
12
  END TYPE T
13
  TYPE(T) :: T1,T2
14
  ALLOCATE ( T1%A(1) )
15
  ALLOCATE ( T2%A(1) )
16
  T1%A = 23
17
  T2 = T1
18
  T1%A = 42
19
  if (T2%A(1) .NE. 23) CALL ABORT
20
END PROGRAM X

powered by: WebSVN 2.1.0

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