URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
! { dg-do compile }
|
! { dg-do compile }
|
! { dg-options "-w" }
|
! { dg-options "-w" }
|
|
|
program c_by_val_2
|
program c_by_val_2
|
external bar
|
external bar
|
real (4) :: bar, ar(2) = (/1.0,2.0/)
|
real (4) :: bar, ar(2) = (/1.0,2.0/)
|
type :: mytype
|
type :: mytype
|
integer :: i
|
integer :: i
|
end type mytype
|
end type mytype
|
type(mytype) :: z
|
type(mytype) :: z
|
character(8) :: c = "blooey"
|
character(8) :: c = "blooey"
|
print *, sin (%VAL(2.0)) ! { dg-error "not allowed in this context" }
|
print *, sin (%VAL(2.0)) ! { dg-error "not allowed in this context" }
|
print *, foo (%VAL(1.0)) ! { dg-error "not allowed in this context" }
|
print *, foo (%VAL(1.0)) ! { dg-error "not allowed in this context" }
|
call foobar (%VAL(0.5)) ! { dg-error "not allowed in this context" }
|
call foobar (%VAL(0.5)) ! { dg-error "not allowed in this context" }
|
print *, bar (%VAL(z)) ! { dg-error "not of numeric type" }
|
print *, bar (%VAL(z)) ! { dg-error "not of numeric type" }
|
print *, bar (%VAL(c)) ! { dg-error "not of numeric type" }
|
print *, bar (%VAL(c)) ! { dg-error "not of numeric type" }
|
print *, bar (%VAL(ar)) ! { dg-error "cannot be an array" }
|
print *, bar (%VAL(ar)) ! { dg-error "cannot be an array" }
|
print *, bar (%VAL(0.0))
|
print *, bar (%VAL(0.0))
|
contains
|
contains
|
function foo (a)
|
function foo (a)
|
real(4) :: a, foo
|
real(4) :: a, foo
|
foo = cos (a)
|
foo = cos (a)
|
end function foo
|
end function foo
|
subroutine foobar (a)
|
subroutine foobar (a)
|
real(4) :: a
|
real(4) :: a
|
print *, a
|
print *, a
|
end subroutine foobar
|
end subroutine foobar
|
end program c_by_val_2
|
end program c_by_val_2
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.