TARGET dummy arguments have fir.target attribute attached to them, but globals do not have any sign of TARGET. This patch adds target attribute for globals, which can be queried via ::fir::GlobalOp::getTarget(). Differential Revision: https://reviews.llvm.org/D135313
10 lines
270 B
Fortran
10 lines
270 B
Fortran
! RUN: bbc -emit-fir %S/target_definition.f90
|
|
! RUN: bbc -emit-fir %s -o - | FileCheck %s
|
|
|
|
! Test TARGET attributes on a declaration of a global symbol.
|
|
! CHECK: fir.global @_QMtarget_modEx target : f32
|
|
real function test()
|
|
use target_mod
|
|
test = x
|
|
end function test
|