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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [assumed_charlen_function_6.f90] - Blame information for rev 862

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
 
3
! PR fortran/41615
4
! Output nicer error message for invalid assumed-len character function result
5
! depending on what kind of contained procedure it is.
6
 
7
module funcs
8
   implicit none
9
contains
10
      function assumed_len(x) ! { dg-error "module procedure" }
11
         character(*) assumed_len
12
         integer, intent(in) :: x
13
      end function assumed_len
14
end module funcs
15
 
16
module mod2
17
  implicit none
18
contains
19
  subroutine mysub ()
20
    contains
21
      function assumed_len(x) ! { dg-error "internal function" }
22
         character(*) assumed_len
23
         integer, intent(in) :: x
24
      end function assumed_len
25
  end subroutine
26
end module mod2
27
 
28
program main
29
  implicit none
30
contains
31
      function assumed_len(x) ! { dg-error "internal function" }
32
         character(*) assumed_len
33
         integer, intent(in) :: x
34
      end function assumed_len
35
end program main
36
 
37
! { dg-final { cleanup-modules "funcs mod2" } }

powered by: WebSVN 2.1.0

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