repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
gcc/fortran/
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
warn_unused_function_3.f90
blob
63d64ffc7ac155e7ecfa7ca7fdcdda22d0abb63a
1
! { dg-do compile }
2
! { dg-options "-Wunused-function" }
3
!
4
! PR 67982: Bogus -Wunused-function warning with contained function
5
!
6
! Contributed by Joost VandeVondele <Joost dot VandeVondele at mat dot ethz dot ch>
7
8
MODULE
base
9
INTERFACE
10
SUBROUTINE
bar_int
()
11
END SUBROUTINE
12
END INTERFACE
13
PUBLIC hook
14
PRIVATE
15
PROCEDURE
(
bar_int
),
POINTER
::
hook
=>
NULL
()
16
END MODULE
base
17
18
MODULE
foo
19
USE
base
,
ONLY
:
hook
20
PUBLIC init
21
PRIVATE
22
CONTAINS
23
SUBROUTINE
init
()
24
hook
=>
bar
25
END SUBROUTINE
init
26
SUBROUTINE
bar
()
27
WRITE
(
6
,*)
"In bar"
28
END SUBROUTINE
29
END MODULE
30
31
USE
foo
,
ONLY
:
init
32
USE
base
,
ONLY
:
hook
33
CALL
init
()
34
CALL
hook
()
35
END