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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [transpose_conjg_1.f90] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
!  { dg-do run }
2
!  Tests the fix for PR35740, where the trick of interchanging the descriptor
3
!  dimensions to implement TRANSPOSE did not work if it is an argument of
4
!  an elemental function - eg. CONJG.  The fix forces a library call for such
5
!  cases.  During the diagnosis of the PR, it was found that the scalarizer was
6
!  completely thrown if the argument of TRANSPOSE was a non-variable
7
!  expression; eg a + c below.  This is also fixed by the library call.
8
!
9
!  Contributed by Dominik Muth 
10
!
11
program main
12
  implicit none
13
  complex, dimension(2,2) :: a,b,c,d
14
  a(1,1) = (1.,1.)
15
  a(2,1) = (2.,2.)
16
  a(1,2) = (3.,3.)
17
  a(2,2) = (4.,4.)
18
!
19
  b = a
20
  b = conjg(transpose(b))
21
  d = a
22
  d = transpose(conjg(d))
23
  if (any (b /= d)) call abort ()
24
!
25
  d = matmul (b,  a )
26
  if (any (d /= matmul (transpose(conjg(a)), a))) call abort ()
27
  if (any (d /= matmul (conjg(transpose(a)), a))) call abort ()
28
!
29
  c = (0.0,1.0)
30
  b = conjg(transpose(a + c))
31
  d = transpose(conjg(a + c))
32
  if (any (b /= d)) call abort ()
33
!
34
  d = matmul (b,  a + c)
35
  if (any (d /= matmul (transpose(conjg(a + c)), a + c))) call abort ()
36
  if (any (d /= matmul (conjg(transpose(a + c)), a + c))) call abort ()
37
 END program main

powered by: WebSVN 2.1.0

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