1! { dg-do compile }
2! This checks the fix for PR 26064
3!
4! Contributed by Sven Buijssen <sven.buijssen@math.uni-dortmund.de>
5module ice
6  implicit none
7  contains
8
9    subroutine foo()
10    contains
11
12      subroutine bar(baz)
13        integer, optional :: baz
14        if (present(baz)) then
15        endif
16      end subroutine bar
17    end subroutine foo
18end module
19