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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [func_decl_4.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-c" }
3
!
4
! Functions shall not have an initializer.
5
!
6
! Due to -fwhole-file, the function declaration
7
! warnings come before the init warnings; thus
8
! the warning for the WRONG lines have been moved to
9
! func_decl_5.f90
10
!
11
 
12
function f1()
13
  integer :: f1 = 42 ! WRONG, see  func_decl_5.f90
14
end function
15
 
16
function f2() RESULT (r)
17
  integer :: r = 42 ! WRONG, see func_decl_5.f90
18
end function
19
 
20
function f3() RESULT (f3)          ! { dg-error "must be different than function name" }
21
  integer :: f3 = 42
22
end function                       ! { dg-error "Expecting END PROGRAM" }
23
! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }

powered by: WebSVN 2.1.0

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