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] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do compile }
! { dg-options "-c" }
!
! Functions shall not have an initializer.
!
! Due to -fwhole-file, the function declaration
! warnings come before the init warnings; thus
! the warning for the WRONG lines have been moved to
! func_decl_5.f90
!

function f1()
  integer :: f1 = 42 ! WRONG, see  func_decl_5.f90
end function

function f2() RESULT (r)
  integer :: r = 42 ! WRONG, see func_decl_5.f90
end function

function f3() RESULT (f3)          ! { dg-error "must be different than function name" }
  integer :: f3 = 42
end function                       ! { dg-error "Expecting END PROGRAM" }
! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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