view gcc/testsuite/gfortran.dg/c_f_pointer_tests_5.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
!
! PR 54667: [OOP] gimplification failure with c_f_pointer
!
! Contributed by Andrew Benson <abensonca@gmail.com>

use, intrinsic :: ISO_C_Binding
type :: nc
end type
type(c_ptr) :: cSelf
class(nc), pointer :: self
call c_f_pointer(cSelf, self)  ! { dg-error "shall not be polymorphic" }
end