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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [c_by_val_2.f90] - Blame information for rev 831

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! { dg-options "-w" }
3
 
4
program c_by_val_2
5
  external bar
6
  real (4) :: bar, ar(2) = (/1.0,2.0/)
7
  type     :: mytype
8
    integer  :: i
9
  end type mytype
10
  type(mytype)  :: z
11
  character(8)  :: c = "blooey"
12
  print *, sin (%VAL(2.0))   ! { dg-error "not allowed in this context" }
13
  print *, foo (%VAL(1.0))   ! { dg-error "not allowed in this context" }
14
  call  foobar (%VAL(0.5))   ! { dg-error "not allowed in this context" }
15
  print *, bar (%VAL(z))     ! { dg-error "not of numeric type" }
16
  print *, bar (%VAL(c))     ! { dg-error "not of numeric type" }
17
  print *, bar (%VAL(ar))    ! { dg-error "cannot be an array" }
18
  print *, bar (%VAL(0.0))
19
contains
20
  function foo (a)
21
    real(4) :: a, foo
22
    foo = cos (a)
23
  end function foo
24
  subroutine foobar (a)
25
    real(4) :: a
26
    print *, a
27
  end subroutine foobar
28
end program c_by_val_2
29
 

powered by: WebSVN 2.1.0

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