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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [assumed_charlen_function_6.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do compile }

! PR fortran/41615
! Output nicer error message for invalid assumed-len character function result
! depending on what kind of contained procedure it is.

module funcs
   implicit none
contains
      function assumed_len(x) ! { dg-error "module procedure" }
         character(*) assumed_len
         integer, intent(in) :: x
      end function assumed_len
end module funcs

module mod2
  implicit none
contains
  subroutine mysub ()
    contains
      function assumed_len(x) ! { dg-error "internal function" }
         character(*) assumed_len
         integer, intent(in) :: x
      end function assumed_len
  end subroutine
end module mod2

program main
  implicit none
contains
      function assumed_len(x) ! { dg-error "internal function" }
         character(*) assumed_len
         integer, intent(in) :: x
      end function assumed_len
end program main

! { dg-final { cleanup-modules "funcs mod2" } }

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.