mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 03:26:48 +00:00

D131585 Adds couple of semantics check for the components of BIND(C) derived-type. This would raise an error when a component is of C_PTR type. Add `bind(c)` to the `__builtin_c_ptr` type so the wrong error is not triggered. Reviewed By: peixin, jeanPerier Differential Revision: https://reviews.llvm.org/D132350
12 lines
223 B
Fortran
12 lines
223 B
Fortran
! RUN: bbc -emit-fir -o - %s | FileCheck %s
|
|
|
|
module bind_c_type
|
|
use, intrinsic :: iso_c_binding
|
|
|
|
type, bind(C) :: t
|
|
type(c_ptr) :: tcptr = C_NULL_PTR
|
|
end type
|
|
end module
|
|
|
|
! CHECK-LABEL: _QMbind_c_typeE.di.t.tcptr
|