annotate gcc/testsuite/gfortran.dg/c_loc_tests_15.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 !
kono
parents:
diff changeset
3 ! PR 44925: [OOP] C_LOC with CLASS pointer
kono
parents:
diff changeset
4 !
kono
parents:
diff changeset
5 ! Contributed by Barron Bichon <barron.bichon@swri.org>
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 use iso_c_binding
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 type :: t
kono
parents:
diff changeset
10 end type t
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 type(c_ptr) :: tt_cptr
kono
parents:
diff changeset
13 class(t), pointer :: tt_fptr
kono
parents:
diff changeset
14 if (associated(tt_fptr)) tt_cptr = c_loc(tt_fptr) ! { dg-error "shall not be polymorphic" }
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 end