1! { dg-do compile }
2!
3! PR 41978: [F03] ICE in gfc_conv_expr_descriptor for array PPC assignment
4!
5! Contributed by Daniel Kraft <domob@gcc.gnu.org>
6
7MODULE m
8  IMPLICIT NONE
9
10  TYPE t
11    PROCEDURE(myproc), POINTER, PASS :: myproc
12  END TYPE t
13
14CONTAINS
15
16  INTEGER FUNCTION myproc (me)
17    CLASS(t), INTENT(IN) :: me
18    myproc = 42
19  END FUNCTION myproc
20
21END MODULE m
22
23PROGRAM main
24  USE m
25  IMPLICIT NONE
26
27  TYPE(t) :: arr(2)
28  arr%myproc => myproc  ! { dg-error "must not have the POINTER attribute" }
29END PROGRAM main
30
31