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_8.f90] - Blame information for rev 310

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
PROGRAM main
7
  IMPLICIT NONE
8
 
9
  TYPE inner
10
    INTEGER :: i
11
    INTEGER :: j
12
  END TYPE inner
13
 
14
  TYPE outer
15
    TYPE(inner) :: comp(2)
16
  END TYPE outer
17
 
18
  TYPE(outer) :: var
19
 
20
  var%comp%i = (/ 1, 2 /)
21
  var%comp%j = (/ 3, 4 /)
22
 
23
  CALL foobar (var, 1, 2)
24
 
25
  IF (ANY (var%comp%i /= (/ 1, 2 /))) CALL abort ()
26
  IF (ANY (var%comp%j /= (/ 3, 4 /))) CALL abort ()
27
 
28
CONTAINS
29
 
30
  SUBROUTINE foobar (x, lower, upper)
31
    TYPE(outer), INTENT(INOUT) :: x
32
    INTEGER, INTENT(IN) :: lower, upper
33
    CALL MVBITS (x%comp%i, 1, 2, x%comp(lower:upper)%i, 1)
34
  END SUBROUTINE foobar
35
 
36
END PROGRAM main

powered by: WebSVN 2.1.0

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