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/] [char_length_15.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
!
3
! Test the fix for PR38915 in which the character length of the
4
! temporaries produced in the assignments marked below was set to
5
! one.
6
!
7
! Contributed by Dick Hendrickson 
8
!
9
program cg0033_41
10
  type t
11
    sequence
12
    integer i
13
    character(len=9) c
14
  end type t
15
  type (t)  L(3),R(3), LL(4), RR(4)
16
  EQUIVALENCE (L,LL)
17
  integer nfv1(3), nfv2(3)
18
  R(1)%c = '123456789'
19
  R(2)%c = 'abcdefghi'
20
  R(3)%c = '!@#$%^&*('
21
  L%c = R%c
22
  LL(1:3)%c = R%c
23
  LL(4)%c = 'QWERTYUIO'
24
  RR%c = LL%c            ! The equivalence forces a dependency
25
  L%c = LL(2:4)%c
26
  if (any (RR(2:4)%c .ne. L%c)) call abort
27
  nfv1 = (/1,2,3/)
28
  nfv2 = nfv1
29
  L%c = R%c
30
  L(nfv1)%c = L(nfv2)%c  ! The vector indices force a dependency
31
  if (any (R%c .ne. L%c)) call abort
32
end
33
 

powered by: WebSVN 2.1.0

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