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/] [array_reference_1.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
! Tests the fix for PR31994, aka 31867, in which the offset
3
! of 'a' in both subroutines was being evaluated incorrectly.
4
! The testcase for PR31867 is char_length_5.f90
5
!
6
! Contributed by Elizabeth Yip 
7
!            and Francois-Xavier Coudert 
8
!
9
program main
10
  call PR31994
11
  call PR31994_comment6
12
contains
13
  subroutine PR31994
14
    implicit none
15
    complex (kind=4), dimension(2,2) :: a, b, c
16
    a(1,1) = (1.,1.)
17
    a(2,1) = (2.,2.)
18
    a(1,2) = (3.,3.)
19
    a(2,2) = (4.,4.)
20
    b=conjg (transpose (a))
21
    c=transpose (a)
22
    c=conjg (c)
23
    if (any (b .ne. c)) call abort ()
24
  end subroutine PR31994
25
  subroutine PR31994_comment6
26
    implicit none
27
    real ,dimension(2,2)::a
28
    integer ,dimension(2,2) :: b, c
29
    a = reshape ((/1.,2.,3.,4./), (/2,2/))
30
    b=int (transpose(a))
31
    c = int (a)
32
    c = transpose (c)
33
    if (any (b .ne. c)) call abort ()
34
  end subroutine PR31994_comment6
35
END program main

powered by: WebSVN 2.1.0

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