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/] [mvbits_7.f90] - Blame information for rev 414

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
 
3
! PR fortran/38883
4
! This ICE'd because the temporary-creation in the MVBITS call was wrong.
5
 
6
! Contributed by Paul Richard Thomas 
7
 
8
  type t
9
    integer  ::  I
10
    character(9)  :: chr
11
  end type
12
  type(t) :: x(4,3)
13
  type(t) :: y(4,3)
14
  x = reshape ([((t (i*j, "a"),i = 1,4), j=1,3)], [4,3])
15
  call foo (x)
16
  y = reshape ([((t (i*j*2, "a"),i = 1,4), j=1,3)], [4,3])
17
  call bar(y, 4, 3, 1, -1, -4, -3)
18
  if (any (x%i .ne. y%i)) call abort
19
contains
20
  SUBROUTINE foo (x)
21
    TYPE(t) x(4, 3)      ! No dependency at all
22
    CALL MVBITS (x%i, 0, 6, x%i, 8)
23
    x%i = x%i * 2
24
  END SUBROUTINE
25
  SUBROUTINE bar (x, NF4, NF3, NF1, MF1, MF4, MF3)
26
    TYPE(t) x(NF4, NF3)  ! Dependency through variable indices
27
    CALL MVBITS (x(NF4:NF1:MF1, NF1:NF3)%i, 1, &
28
                 6, x(-MF4:-MF1:-NF1, -MF1:-MF3)%i, 9)
29
  END SUBROUTINE
30
end

powered by: WebSVN 2.1.0

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