xref: /llvm-project/flang/test/Lower/OpenMP/Todo/requires-unnamed-common.f90 (revision 29aa749087be38d3e5a3a37e0b8e8ab74e9f79aa)
1! This test checks the lowering of REQUIRES inside of an unnamed BLOCK DATA.
2! The symbol of the `symTab` scope of the `BlockDataUnit` PFT node is null in
3! this case, resulting in the inability to store the REQUIRES flags gathered in
4! it.
5
6! RUN: %flang_fc1 -emit-fir -fopenmp %s -o - | FileCheck %s
7! RUN: %flang_fc1 -emit-fir -fopenmp -fopenmp-is-target-device %s -o - | FileCheck %s
8! RUN: bbc -fopenmp -emit-fir %s -o - | FileCheck %s
9! RUN: bbc -fopenmp -fopenmp-is-target-device -emit-fir %s -o - | FileCheck %s
10! XFAIL: *
11
12!CHECK:         module attributes {
13!CHECK-SAME:    omp.requires = #omp<clause_requires unified_shared_memory>
14block data
15  !$omp requires unified_shared_memory
16  integer :: x
17  common /block/ x
18  data x / 10 /
19end
20
21subroutine f
22  !$omp declare target
23end subroutine f
24