comparison gcc/testsuite/gfortran.dg/proc_ptr_comp_22.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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
7 MODULE m
8 IMPLICIT NONE
9
10 TYPE t
11 PROCEDURE(myproc), POINTER, PASS :: myproc
12 END TYPE t
13
14 CONTAINS
15
16 INTEGER FUNCTION myproc (me)
17 CLASS(t), INTENT(IN) :: me
18 myproc = 42
19 END FUNCTION myproc
20
21 END MODULE m
22
23 PROGRAM 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" }
29 END PROGRAM main
30