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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [c_by_val_1.f] - Blame information for rev 774

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

Line No. Rev Author Line
1 694 jeremybenn
C { dg-do run }
2
C { dg-additional-sources c_by_val.c }
3
C { dg-options "-ff2c -w -O0" }
4
 
5
      program c_by_val_1
6
      external   f_to_f, i_to_i, c_to_c
7
      external   f_to_f8, i_to_i8, c_to_c8
8
      real       a, b, c
9
      real(8)    a8, b8, c8
10
      integer(4) i, j, k
11
      integer(8) i8, j8, k8
12
      complex    u, v, w, c_to_c
13
      complex(8) u8, v8, w8, c_to_c8
14
 
15
      a = 42.0
16
      b = 0.0
17
      c = a
18
      call  f_to_f (b, %VAL (a), %REF (c), %LOC (c))
19
      if ((2.0 * a).ne.b) call abort ()
20
 
21
      a8 = 43.0
22
      b8 = 1.0
23
      c8 = a8
24
      call  f_to_f8 (b8, %VAL (a8), %REF (c8), %LOC (c8))
25
      if ((2.0 * a8).ne.b8) call abort ()
26
 
27
      i = 99
28
      j = 0
29
      k = i
30
      call i_to_i (j, %VAL (i), %REF (k), %LOC (k))
31
      if ((3 * i).ne.j) call abort ()
32
 
33
      i8 = 199
34
      j8 = 10
35
      k8 = i8
36
      call i_to_i8 (j8, %VAL (i8), %REF (k8), %LOC (k8))
37
      if ((3 * i8).ne.j8) call abort ()
38
 
39
      u = (-1.0, 2.0)
40
      v = (1.0, -2.0)
41
      w = u
42
      v = c_to_c (%VAL (u), %REF (w), %LOC (w))
43
      if ((4.0 * u).ne.v) call abort ()
44
 
45
      u8 = (-1.0, 2.0)
46
      v8 = (1.0, -2.0)
47
      w8 = u8
48
      v8 = c_to_c8 (%VAL (u8), %REF (w8), %LOC (w8))
49
      if ((4.0 * u8).ne.v8) call abort ()
50
 
51
      stop
52
      end
53
 

powered by: WebSVN 2.1.0

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