mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
[flang] Main program symbol no longer conflicts with the other symbols (#149169)
The following code is now accepted: ``` module m end program m use m end ``` The PROGRAM name doesn't really have an effect on the compilation result, so it shouldn't result in symbol name conflicts. This change makes the main program symbol name all uppercase in the cooked character stream. This makes it distinct from all other symbol names that are all lowercase in cooked character stream. Modified the tests that were checking for lower case main program name.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<!--===- docs/Extensions.md
|
||||
|
||||
<!--===- docs/Extensions.md
|
||||
|
||||
Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
See https://llvm.org/LICENSE.txt for license information.
|
||||
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
|
||||
-->
|
||||
|
||||
# Fortran Extensions supported by Flang
|
||||
@@ -170,6 +170,18 @@ end
|
||||
In the case of `DEFERRED` bindings in an `ABSTRACT` derived type,
|
||||
however, overrides are necessary, so they are permitted for inaccessible
|
||||
bindings with an optional warning.
|
||||
* Main program name is allowed to be the same as the other symbols used
|
||||
in the main program, for example:
|
||||
```
|
||||
module m
|
||||
end
|
||||
program m
|
||||
use m
|
||||
end
|
||||
```
|
||||
Note that internally the main program symbol name is all uppercase, unlike
|
||||
the names of all other symbols, which are usually all lowercase. This
|
||||
may make a difference in testing/debugging.
|
||||
|
||||
## Extensions, deletions, and legacy features supported by default
|
||||
|
||||
|
||||
@@ -1156,8 +1156,7 @@ void OmpStructureChecker::CheckThreadprivateOrDeclareTargetVar(
|
||||
(sym->has<MainProgramDetails>() ||
|
||||
sym->has<ModuleDetails>())) {
|
||||
context_.Say(name->source,
|
||||
"The module name or main program name cannot be in a "
|
||||
"%s "
|
||||
"The module name cannot be in a %s "
|
||||
"directive"_err_en_US,
|
||||
ContextDirectiveAsFortran());
|
||||
} else if (!IsSaved(*name->symbol) &&
|
||||
|
||||
@@ -489,15 +489,30 @@ public:
|
||||
|
||||
// C1401
|
||||
void Post(const parser::MainProgram &mainProgram) {
|
||||
// Uppercase the name of the main program, so that its symbol name
|
||||
// would be unique from similarly named non-main-program symbols.
|
||||
auto upperCaseCharBlock = [](const parser::CharBlock &cb) {
|
||||
char *ch{const_cast<char *>(cb.begin())};
|
||||
char *endCh{ch + cb.size()};
|
||||
while (ch != endCh) {
|
||||
*ch++ = parser::ToUpperCaseLetter(*ch);
|
||||
}
|
||||
};
|
||||
const parser::CharBlock *progName{nullptr};
|
||||
if (const auto &program{
|
||||
std::get<std::optional<parser::Statement<parser::ProgramStmt>>>(
|
||||
mainProgram.t)}) {
|
||||
progName = &program->statement.v.source;
|
||||
upperCaseCharBlock(*progName);
|
||||
}
|
||||
if (const parser::CharBlock *
|
||||
endName{GetStmtName(std::get<parser::Statement<parser::EndProgramStmt>>(
|
||||
mainProgram.t))}) {
|
||||
if (const auto &program{
|
||||
std::get<std::optional<parser::Statement<parser::ProgramStmt>>>(
|
||||
mainProgram.t)}) {
|
||||
if (*endName != program->statement.v.source) {
|
||||
upperCaseCharBlock(*endName);
|
||||
if (progName) {
|
||||
if (*endName != *progName) {
|
||||
context_.Say(*endName, "END PROGRAM name mismatch"_err_en_US)
|
||||
.Attach(program->statement.v.source, "should be"_en_US);
|
||||
.Attach(*progName, "should be"_en_US);
|
||||
}
|
||||
} else {
|
||||
context_.Say(*endName,
|
||||
|
||||
@@ -8,7 +8,7 @@ program main
|
||||
integer, device :: dvar
|
||||
end program
|
||||
|
||||
! CHECK-LABEL: PROGRAM main
|
||||
! CHECK-LABEL: PROGRAM MAIN
|
||||
! CHECK: INTEGER :: var = 1
|
||||
! CHECK: INTEGER, DEVICE :: dvar
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
! RUN: %flang_fc1 -fdebug-unparse %s | FileCheck %s --check-prefix=DEFAULT
|
||||
! RUN: %flang_fc1 -fdebug-unparse -fno-analyzed-objects-for-unparse %s | FileCheck %s --check-prefix=DISABLED
|
||||
|
||||
! DEFAULT: PROGRAM test
|
||||
! DEFAULT: PROGRAM TEST
|
||||
! DEFAULT-NEXT: REAL, PARAMETER :: val = 3.43e2_4
|
||||
! DEFAULT-NEXT: PRINT *, 3.47e2_4
|
||||
! DEFAULT-NEXT: END PROGRAM
|
||||
|
||||
! DISABLED: PROGRAM test
|
||||
! DISABLED: PROGRAM TEST
|
||||
! DISABLED-NEXT: REAL, PARAMETER :: val = 343.0
|
||||
! DISABLED-NEXT: PRINT *, val+4
|
||||
! DISABLED-NEXT: END PROGRAM
|
||||
|
||||
@@ -25,7 +25,7 @@ end
|
||||
!CHECK: implicit none
|
||||
!CHECK: real(kind=real32) x
|
||||
!CHECK: end module
|
||||
!CHECK: program test
|
||||
!CHECK: program TEST
|
||||
!CHECK: use :: m1
|
||||
!CHECK: use :: basictestmoduletwo
|
||||
!CHECK: implicit none
|
||||
|
||||
@@ -89,7 +89,7 @@ END
|
||||
! CHECK-DAG: ![[CBF3]] = !DICommonBlock(scope: ![[F3]], declaration: null, name: "__BLNK__"{{.*}})
|
||||
! CHECK-DAG: ![[CBAF3]] = !DICommonBlock(scope: ![[F3]], declaration: null, name: "a"{{.*}})
|
||||
|
||||
! CHECK-DAG: ![[MAIN:[0-9]+]] = {{.*}}!DISubprogram(name: "test"{{.*}})
|
||||
! CHECK-DAG: ![[MAIN:[0-9]+]] = {{.*}}!DISubprogram(name: "TEST"{{.*}})
|
||||
! CHECK-DAG: ![[CBM]] = !DICommonBlock(scope: ![[MAIN]], declaration: null, name: "__BLNK__"{{.*}})
|
||||
! CHECK-DAG: ![[CBAM]] = !DICommonBlock(scope: ![[MAIN]], declaration: null, name: "a"{{.*}})
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
! BOTH-LABEL: }
|
||||
|
||||
program mn
|
||||
! BOTH-DAG: ![[MAIN:.*]] = distinct !DISubprogram(name: "mn", {{.*}})
|
||||
! BOTH-DAG: ![[MAIN:.*]] = distinct !DISubprogram(name: "MN", {{.*}})
|
||||
|
||||
! BOTH-DAG: ![[TYI32:.*]] = !DIBasicType(name: "integer", size: 32, encoding: DW_ATE_signed)
|
||||
! BOTH-DAG: ![[TYI64:.*]] = !DIBasicType(name: "integer", size: 64, encoding: DW_ATE_signed)
|
||||
|
||||
@@ -25,6 +25,6 @@ program main
|
||||
type(t2) :: b
|
||||
end
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "main"}
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"}
|
||||
! CHECK: %{{.*}} = cuf.alloc !fir.type<_QMm1Tty_device{x:!fir.box<!fir.heap<!fir.array<?xi32>>>}> {bindc_name = "a", data_attr = #cuf.cuda<managed>, uniq_name = "_QFEa"}
|
||||
! CHECK: %{{.*}} = cuf.alloc !fir.type<_QMm1Tt2{b:!fir.type<_QMm1Tt1{a:!fir.box<!fir.heap<!fir.array<?xf32>>>}>}> {bindc_name = "b", data_attr = #cuf.cuda<managed>, uniq_name = "_QFEb"}
|
||||
|
||||
@@ -28,6 +28,6 @@ program main
|
||||
return
|
||||
end
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "main"}
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"}
|
||||
! CHECK: cuf.alloc !fir.box<!fir.heap<!fir.array<?xi32>>> {bindc_name = "a", data_attr = #cuf.cuda<device>, uniq_name = "_QFEa"} -> !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
|
||||
! CHECK-NOT: cuf.free
|
||||
|
||||
@@ -13,7 +13,7 @@ program test
|
||||
return
|
||||
end
|
||||
|
||||
! CHECK: func.func @_QQmain() attributes {fir.bindc_name = "test"} {
|
||||
! CHECK: func.func @_QQmain() attributes {fir.bindc_name = "TEST"} {
|
||||
! CHECK: %[[DECL:.*]]:2 = hlfir.declare
|
||||
! CHECK: cf.cond_br %{{.*}}, ^bb1, ^bb2
|
||||
! CHECK-NEXT: ^bb1:
|
||||
|
||||
@@ -24,7 +24,7 @@ program main
|
||||
call mvbits(from, 2, 2, to, 0)
|
||||
if (any(to /= 5)) STOP 1
|
||||
end program
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "main"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"} {
|
||||
! CHECK: %[[VAL_0:.*]] = arith.constant 3 : index
|
||||
! CHECK: %[[VAL_1:.*]] = fir.alloca !fir.array<3xi32> {bindc_name = "from", uniq_name = "_QFEfrom"}
|
||||
! CHECK: %[[VAL_2:.*]] = fir.shape %[[VAL_0]] : (index) -> !fir.shape<1>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
END
|
||||
END
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "main"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.alloca !fir.type<_QMmTdt{pp1:!fir.boxproc<(!fir.ref<i32>) -> i32>}>
|
||||
! CHECK: %[[VAL_1:.*]] = fir.alloca !fir.type<_QMmTdt{pp1:!fir.boxproc<(!fir.ref<i32>) -> i32>}>
|
||||
! CHECK: %[[VAL_2:.*]] = fir.alloca !fir.boxproc<(!fir.ref<i32>) -> i32> {bindc_name = "pp2", uniq_name = "_QFEpp2"}
|
||||
|
||||
@@ -8,7 +8,7 @@ program acc_atomic_test
|
||||
g = h
|
||||
end program acc_atomic_test
|
||||
|
||||
! CHECK: func @_QQmain() attributes {fir.bindc_name = "acc_atomic_test"} {
|
||||
! CHECK: func @_QQmain() attributes {fir.bindc_name = "ACC_ATOMIC_TEST"} {
|
||||
! CHECK: %[[VAR_G:.*]] = fir.alloca f32 {bindc_name = "g", uniq_name = "_QFEg"}
|
||||
! CHECK: %[[G_DECL:.*]]:2 = hlfir.declare %[[VAR_G]] {uniq_name = "_QFEg"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>)
|
||||
! CHECK: %[[VAR_H:.*]] = fir.alloca f32 {bindc_name = "h", uniq_name = "_QFEh"}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
! This test checks the lowering of atomic write
|
||||
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "acc_atomic_write_test"} {
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "ACC_ATOMIC_WRITE_TEST"} {
|
||||
!CHECK: %[[VAR_X:.*]] = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFEx"}
|
||||
!CHECK: %[[X_DECL:.*]]:2 = hlfir.declare %[[VAR_X]] {uniq_name = "_QFEx"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[VAR_Y:.*]] = fir.alloca i32 {bindc_name = "y", uniq_name = "_QFEy"}
|
||||
|
||||
@@ -30,5 +30,5 @@ end program
|
||||
! CHECK: acc.routine @acc_routine_1 func(@_QFPsub2) seq
|
||||
! CHECK: acc.routine @acc_routine_0 func(@_QMdummy_modPsub1) seq
|
||||
! CHECK: func.func @_QMdummy_modPsub1(%arg0: !fir.ref<i32> {fir.bindc_name = "i"}) attributes {acc.routine_info = #acc.routine_info<[@acc_routine_0]>}
|
||||
! CHECK: func.func @_QQmain() attributes {fir.bindc_name = "test_acc_routine"}
|
||||
! CHECK: func.func @_QQmain() attributes {fir.bindc_name = "TEST_ACC_ROUTINE"}
|
||||
! CHECK: func.func private @_QFPsub2() attributes {acc.routine_info = #acc.routine_info<[@acc_routine_1]>, fir.host_symbol = @_QQmain, llvm.linkage = #llvm.linkage<internal>}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
! This test checks the lowering of atomic read
|
||||
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "ompatomic"} {
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "OMPATOMIC"} {
|
||||
!CHECK: %[[A_REF:.*]] = fir.alloca i32 {bindc_name = "a", uniq_name = "_QFEa"}
|
||||
!CHECK: %[[A_DECL:.*]]:2 = hlfir.declare %[[A_REF]] {uniq_name = "_QFEa"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[B_REF:.*]] = fir.alloca i32 {bindc_name = "b", uniq_name = "_QFEb"}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
! This test checks the lowering of atomic write
|
||||
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "ompatomicwrite"} {
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "OMPATOMICWRITE"} {
|
||||
!CHECK: %[[X_REF:.*]] = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFEx"}
|
||||
!CHECK: %[[X_DECL:.*]]:2 = hlfir.declare %[[X_REF]] {uniq_name = "_QFEx"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[Y_REF:.*]] = fir.alloca i32 {bindc_name = "y", uniq_name = "_QFEy"}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
|
||||
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "sample"} {
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "SAMPLE"} {
|
||||
!CHECK: %[[val_0:.*]] = fir.alloca i32 {bindc_name = "a", uniq_name = "_QFEa"}
|
||||
!CHECK: %[[val_1:.*]]:2 = hlfir.declare %[[val_0]] {uniq_name = "_QFEa"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[val_2:.*]] = fir.alloca i32 {bindc_name = "b", uniq_name = "_QFEb"}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
! Test lowering of Cray pointee references.
|
||||
! RUN: flang -fc1 -emit-hlfir -fopenmp %s -o - 2>&1 | FileCheck %s
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "test_cray_pointers_02"}
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "TEST_CRAY_POINTERS_02"}
|
||||
program test_cray_pointers_02
|
||||
implicit none
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
!CHECK: omp.yield(%[[PRIV_X]] : !fir.ref<i32>)
|
||||
!CHECK: }
|
||||
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "default_clause_lowering"} {
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "DEFAULT_CLAUSE_LOWERING"} {
|
||||
!CHECK: %[[W:.*]] = fir.alloca i32 {bindc_name = "w", uniq_name = "_QFEw"}
|
||||
!CHECK: %[[W_DECL:.*]]:2 = hlfir.declare %[[W]] {uniq_name = "_QFEw"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[X:.*]] = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFEx"}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
! RUN: | FileCheck %s
|
||||
|
||||
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "default_clause_lowering"} {
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "DEFAULT_CLAUSE_LOWERING"} {
|
||||
!CHECK: %[[W:.*]] = fir.alloca i32 {bindc_name = "w", uniq_name = "_QFEw"}
|
||||
!CHECK: %[[W_DECL:.*]]:2 = hlfir.declare %[[W]] {uniq_name = "_QFEw"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[X:.*]] = fir.alloca i32 {bindc_name = "x", uniq_name = "_QFEx"}
|
||||
|
||||
@@ -80,7 +80,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEi) : !fir.ref<i32>
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
! CHECK: %[[VAL_2:.*]] = fir.address_of(@_QFEr) : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
|
||||
|
||||
@@ -68,7 +68,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: %[[VAL_7:.*]] = fir.alloca !fir.box<!fir.array<3x2xi32>>
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEi) : !fir.ref<!fir.array<3x2xi32>>
|
||||
! CHECK: %[[VAL_1:.*]] = arith.constant 2 : index
|
||||
|
||||
@@ -63,7 +63,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEi) : !fir.ref<!fir.array<3xi32>>
|
||||
! CHECK: %[[VAL_1:.*]] = arith.constant 3 : index
|
||||
! CHECK: %[[VAL_2:.*]] = fir.shape %[[VAL_1]] : (index) -> !fir.shape<1>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
!CHECK: fir.store %[[CR]] to %[[C0]] : !fir.ref<i32>
|
||||
!CHECK: omp.yield(%[[C0]] : !fir.ref<i32>)
|
||||
!CHECK: }
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "mn"} {
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "MN"} {
|
||||
!CHECK: %[[RED_ACCUM_REF:[_a-z0-9]+]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFEi"}
|
||||
!CHECK: %[[RED_ACCUM_DECL:[_a-z0-9]+]]:2 = hlfir.declare %[[RED_ACCUM_REF]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[C0:[_a-z0-9]+]] = arith.constant 0 : i32
|
||||
|
||||
@@ -82,7 +82,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEi) : !fir.ref<i32>
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
! CHECK: %[[VAL_2:.*]] = fir.address_of(@_QFEr) : !fir.ref<!fir.box<!fir.ptr<!fir.array<?xi32>>>>
|
||||
|
||||
@@ -25,7 +25,7 @@ end program main
|
||||
! CHECK: omp.yield(%[[VAL_2]] : i32)
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "main"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "n", uniq_name = "_QFEn"}
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFEn"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
! CHECK: %[[VAL_2:.*]] = arith.constant 0 : i32
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
!CHECK: %[[CR:[_a-z0-9]+]] = arith.addi %[[C0]], %[[C1]] : i32
|
||||
!CHECK: omp.yield(%[[CR]] : i32)
|
||||
!CHECK: }
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "mn"} {
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "MN"} {
|
||||
!CHECK: %[[RED_ACCUM_REF:[_a-z0-9]+]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFEi"}
|
||||
!CHECK: %[[RED_ACCUM_DECL:[_a-z0-9]+]]:2 = hlfir.declare %[[RED_ACCUM_REF]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[C0:[_a-z0-9]+]] = arith.constant 0 : i32
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
! RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - | FileCheck %s
|
||||
! RUN: bbc -hlfir -emit-hlfir %openmp_flags %s -o - | FileCheck %s
|
||||
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "sample"} {
|
||||
!CHECK: func @_QQmain() attributes {fir.bindc_name = "SAMPLE"} {
|
||||
!CHECK: %[[COUNT:.*]] = fir.address_of(@_QFEcount) : !fir.ref<i32>
|
||||
!CHECK: %[[COUNT_DECL:.*]]:2 = hlfir.declare %[[COUNT]] {uniq_name = "_QFEcount"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[ETA:.*]] = fir.alloca f32 {bindc_name = "eta", uniq_name = "_QFEeta"}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
|
||||
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "main"} {
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"} {
|
||||
!CHECK: %[[A:.*]] = fir.alloca i32 {bindc_name = "a", uniq_name = "_QFEa"}
|
||||
!CHECK: %[[A_DECL:.*]]:2 = hlfir.declare %[[A]] {fortran_attrs = #fir.var_attrs<internal_assoc>, uniq_name = "_QFEa"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[A_ADDR:.*]] = fir.address_of(@_QFEa) : !fir.ref<i32>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
|
||||
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "main"} {
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"} {
|
||||
!CHECK: %[[A:.*]] = fir.alloca i32 {bindc_name = "a", uniq_name = "_QFEa"}
|
||||
!CHECK: %[[A_DECL:.*]]:2 = hlfir.declare %[[A]] {fortran_attrs = #fir.var_attrs<internal_assoc>, uniq_name = "_QFEa"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[A_ADDR:.*]] = fir.address_of(@_QFEa) : !fir.ref<i32>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
|
||||
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "main"} {
|
||||
!CHECK: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"} {
|
||||
!CHECK: %[[A:.*]] = fir.address_of(@_QFEa) : !fir.ref<i32>
|
||||
!CHECK: %[[A_DECL:.*]]:2 = hlfir.declare %[[A]] {fortran_attrs = #fir.var_attrs<internal_assoc>, uniq_name = "_QFEa"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
!CHECK: %[[TP_A:.*]] = omp.threadprivate %[[A_DECL]]#0 : !fir.ref<i32> -> !fir.ref<i32>
|
||||
|
||||
@@ -7,7 +7,7 @@ program wsloop
|
||||
integer :: i
|
||||
integer :: chunk
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "wsloop"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "WSLOOP"} {
|
||||
! CHECK: %[[CHUNK_REF:.*]] = fir.alloca i32 {bindc_name = "chunk", uniq_name = "_QFEchunk"}
|
||||
! CHECK: %[[VAL_0:.*]]:2 = hlfir.declare %[[CHUNK_REF]] {uniq_name = "_QFEchunk"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
! RUN: bbc -fopenmp -emit-hlfir %s -o - | FileCheck %s
|
||||
|
||||
!CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "wsloop_collapse"} {
|
||||
!CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "WSLOOP_COLLAPSE"} {
|
||||
program wsloop_collapse
|
||||
!CHECK: %[[VAL_6:.*]] = fir.alloca i32 {bindc_name = "a", uniq_name = "_QFEa"}
|
||||
!CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_6]] {uniq_name = "_QFEa"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
|
||||
@@ -156,7 +156,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce15"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE15"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEarr) : !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {fortran_attrs = {{.*}}<allocatable>, uniq_name = "_QFEarr"} : (!fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>) -> (!fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>, !fir.ref<!fir.box<!fir.heap<!fir.array<?xi32>>>>)
|
||||
! CHECK: %[[VAL_2:.*]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFEi"}
|
||||
|
||||
@@ -63,7 +63,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEi) : !fir.ref<i32>
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
! CHECK: %[[VAL_2:.*]] = fir.alloca !fir.box<!fir.heap<i32>> {bindc_name = "r", uniq_name = "_QFEr"}
|
||||
|
||||
@@ -31,5 +31,5 @@ end program
|
||||
! CHECK: omp.yield(%[[ARG0]] : !fir.ref<!fir.box<!fir.array<2xi32>>>)
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: omp.wsloop {{.*}} reduction(byref @add_reduction_byref_box_2xi32 %{{.*}} -> %{{.*}} : !fir.ref<!fir.box<!fir.array<2xi32>>>)
|
||||
|
||||
@@ -40,5 +40,5 @@ end program
|
||||
! CHECK: omp.yield(%[[ARG0]] : !fir.ref<!fir.box<!fir.array<?xi32>>>)
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: omp.wsloop {{.*}} reduction(byref @add_reduction_byref_box_Uxi32 %{{.*}} -> %{{.*}} : !fir.ref<!fir.box<!fir.array<?xi32>>>)
|
||||
|
||||
@@ -65,7 +65,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEi) : !fir.ref<i32>
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
! CHECK: %[[VAL_2:.*]] = fir.address_of(@_QFEr) : !fir.ref<!fir.array<2xi32>>
|
||||
|
||||
@@ -65,7 +65,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEi) : !fir.ref<i32>
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
! CHECK: %[[VAL_2:.*]] = fir.address_of(@_QFEr) : !fir.ref<!fir.array<2xi32>>
|
||||
|
||||
@@ -28,7 +28,7 @@ end program
|
||||
! CHECK: omp.yield(%[[VAL_2]] : i32)
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEi) : !fir.ref<i32>
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
! CHECK: %[[VAL_2:.*]] = fir.address_of(@_QFEr) : !fir.ref<i32>
|
||||
|
||||
@@ -93,7 +93,7 @@ endprogram
|
||||
! CHECK: omp.yield(%[[VAL_2]] : f64)
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "main"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.address_of(@_QFEarray) : !fir.ref<!fir.array<3x3xf64>>
|
||||
! CHECK: %[[VAL_1:.*]] = arith.constant 3 : index
|
||||
! CHECK: %[[VAL_2:.*]] = arith.constant 3 : index
|
||||
|
||||
@@ -64,7 +64,7 @@ end program
|
||||
! CHECK: omp.yield
|
||||
! CHECK: }
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "reduce_pointer"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "REDUCE_POINTER"} {
|
||||
! CHECK: %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFEi"}
|
||||
! CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
|
||||
! CHECK: %[[VAL_2:.*]] = fir.alloca !fir.box<!fir.ptr<i32>> {bindc_name = "v", uniq_name = "_QFEv"}
|
||||
|
||||
@@ -32,7 +32,7 @@ program p
|
||||
call charlit
|
||||
end program p
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "p"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "P"} {
|
||||
! CHECK: %[[VAL_0:.*]] = arith.constant 4 : index
|
||||
! CHECK: %[[VAL_1:.*]] = arith.constant 3 : index
|
||||
! CHECK: %[[VAL_2:.*]] = fir.alloca !fir.array<3x!fir.char<1,4>> {bindc_name = "c1", uniq_name = "_QFEc1"}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
! RUN: bbc -hlfir=false -fwrapv -o - --outline-intrinsics %s | FileCheck %s
|
||||
|
||||
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "p"} {
|
||||
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "P"} {
|
||||
! CHECK-DAG: %[[VAL_0:.*]] = arith.constant 10 : index
|
||||
! CHECK-DAG: %[[VAL_4:.*]] = arith.constant 2 : index
|
||||
! CHECK-DAG: %[[VAL_5:.*]] = arith.constant 1 : index
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
program basic
|
||||
end program
|
||||
|
||||
! CHECK: 1 Program basic
|
||||
! CHECK: 1 Program BASIC
|
||||
! CHECK: 1 EndProgramStmt: end program
|
||||
! CHECK: End Program basic
|
||||
! CHECK: End Program BASIC
|
||||
|
||||
! FIR-LABEL: func @_QQmain() attributes {fir.bindc_name = "basic"} {
|
||||
! FIR-LABEL: func @_QQmain() attributes {fir.bindc_name = "BASIC"} {
|
||||
! FIR: return
|
||||
! FIR: }
|
||||
|
||||
@@ -13,7 +13,7 @@ program i128
|
||||
print*,y
|
||||
end
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "i128"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "I128"} {
|
||||
! CHECK-COUNT-2: %{{.*}} = fir.call @_FortranAioOutputInteger128(%{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<i8>, i128) -> i1
|
||||
|
||||
|
||||
|
||||
@@ -255,5 +255,5 @@ program p
|
||||
type(t1) :: t
|
||||
end program
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "p"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "P"} {
|
||||
! CHECK-NOT: fir.call @_FortranADestroy
|
||||
|
||||
@@ -5,7 +5,7 @@ include 'location0.inc'
|
||||
|
||||
end
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "test"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "TEST"} {
|
||||
! CHECK: fir.call @_FortranAioOutputAscii(%{{.*}}, %{{.*}}, %{{.*}}) fastmath<contract> : (!fir.ref<i8>, !fir.ref<i8>, i64) -> i1 loc(fused<#fir<loc_kind_array[ base, inclusion, inclusion]>>["{{.*}}location1.inc":1:10, "{{.*}}location0.inc":1:1, "{{.*}}location.f90":4:1])
|
||||
! CHECK: return loc("{{.*}}location.f90":6:1)
|
||||
! CHECK: } loc("{{.*}}location.f90":3:1)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
|
||||
|
||||
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "nested_where"} {
|
||||
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "NESTED_WHERE"} {
|
||||
program nested_where
|
||||
|
||||
! CHECK: %[[VAL_0:.*]] = fir.alloca i32 {adapt.valuebyref, bindc_name = "i"}
|
||||
|
||||
@@ -1146,7 +1146,7 @@ program test
|
||||
l = i < o%inner
|
||||
end program
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "test"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "TEST"} {
|
||||
! CHECK: %[[ADDR_O:.*]] = fir.address_of(@_QFEo) : !fir.ref<!fir.box<!fir.heap<!fir.type<_QMpolymorphic_testTouter{inner:!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>}>>>>
|
||||
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ADDR_O]] : (!fir.ref<!fir.box<!fir.heap<!fir.type<_QMpolymorphic_testTouter{inner:!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>}>>>>) -> !fir.ref<!fir.box<none>>
|
||||
! CHECK: %{{.*}} = fir.call @_FortranAAllocatableAllocate(%[[BOX_NONE]], %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.ref<i64>, i1, !fir.box<none>, !fir.ref<i8>, i32) -> i32
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
! Test Pre-FIR Tree captures all the intended nodes from the parse-tree
|
||||
! Coarray and OpenMP related nodes are tested in other files.
|
||||
|
||||
! CHECK: Program test_prog
|
||||
! CHECK: Program TEST_PROG
|
||||
program test_prog
|
||||
! Check specification part is not part of the tree.
|
||||
interface
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
! Test Pre-FIR Tree captures OpenMP related constructs
|
||||
|
||||
! CHECK: Program test_omp
|
||||
! CHECK: Program TEST_OMP
|
||||
program test_omp
|
||||
! CHECK: PrintStmt
|
||||
print *, "sequential"
|
||||
|
||||
@@ -25,13 +25,13 @@ contains
|
||||
end
|
||||
! CHECK: End Module m2
|
||||
|
||||
! CHECK: Program main
|
||||
! CHECK: Program MAIN
|
||||
program main
|
||||
real :: y
|
||||
! CHECK-NEXT: OpenMPDeclarativeConstruct
|
||||
!$omp threadprivate(y)
|
||||
end
|
||||
! CHECK: End Program main
|
||||
! CHECK: End Program MAIN
|
||||
|
||||
! CHECK: Subroutine sub1
|
||||
subroutine sub1()
|
||||
|
||||
@@ -124,7 +124,7 @@ subroutine should_not_collide()
|
||||
! CHECK: }
|
||||
end subroutine
|
||||
|
||||
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "test"} {
|
||||
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "TEST"} {
|
||||
program test
|
||||
! CHECK: }
|
||||
contains
|
||||
|
||||
@@ -4,7 +4,7 @@ program basic
|
||||
return
|
||||
end program
|
||||
|
||||
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "basic"} {
|
||||
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "BASIC"} {
|
||||
! CHECK: return
|
||||
! CHECK: }
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ n=1000
|
||||
!$omp end parallel
|
||||
end program
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "main"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "MAIN"} {
|
||||
! CHECK: %[[VAL_0:.*]] = arith.constant 1 : i32
|
||||
! CHECK: %[[VAL_1:.*]] = arith.constant 1000 : i32
|
||||
! CHECK: %[[VAL_2:.*]] = arith.constant 0 : i32
|
||||
|
||||
@@ -21,7 +21,7 @@ contains
|
||||
end subroutine
|
||||
end program
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "p"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "P"} {
|
||||
! CHECK: %[[VAL_0:.*]] = arith.constant 11 : i32
|
||||
! CHECK: %[[VAL_1:.*]] = arith.constant 0 : index
|
||||
! CHECK: %[[VAL_2:.*]] = arith.constant true
|
||||
|
||||
@@ -70,7 +70,7 @@ contains
|
||||
end program
|
||||
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "p"} {
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "P"} {
|
||||
! CHECK: %[[VAL_0:.*]] = arith.constant 1 : index
|
||||
! CHECK: %[[VAL_1:.*]] = arith.constant 0 : index
|
||||
! CHECK: %[[VAL_2:.*]] = arith.constant 10 : index
|
||||
|
||||
@@ -15,7 +15,7 @@ program bug47659
|
||||
end do label1
|
||||
end program
|
||||
|
||||
!CHECK-LABEL: PROGRAM bug47659
|
||||
!CHECK-LABEL: PROGRAM BUG47659
|
||||
!CHECK: !$ACC PARALLEL LOOP
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenacc
|
||||
|
||||
!DEF: /mm MainProgram
|
||||
program mm
|
||||
!DEF: /mm/x ObjectEntity REAL(4)
|
||||
!DEF: /mm/y ObjectEntity REAL(4)
|
||||
!DEF: /MM MainProgram
|
||||
program MM
|
||||
!DEF: /MM/x ObjectEntity REAL(4)
|
||||
!DEF: /MM/y ObjectEntity REAL(4)
|
||||
real x, y
|
||||
!DEF: /mm/a ObjectEntity INTEGER(4)
|
||||
!DEF: /mm/b ObjectEntity INTEGER(4)
|
||||
!DEF: /mm/c ObjectEntity INTEGER(4)
|
||||
!DEF: /mm/i ObjectEntity INTEGER(4)
|
||||
!DEF: /MM/a ObjectEntity INTEGER(4)
|
||||
!DEF: /MM/b ObjectEntity INTEGER(4)
|
||||
!DEF: /MM/c ObjectEntity INTEGER(4)
|
||||
!DEF: /MM/i ObjectEntity INTEGER(4)
|
||||
integer a(10), b(10), c(10), i
|
||||
!REF: /mm/b
|
||||
!REF: /MM/b
|
||||
b = 2
|
||||
!$acc parallel present(c) firstprivate(b) private(a)
|
||||
!$acc loop
|
||||
!REF: /mm/i
|
||||
!REF: /MM/i
|
||||
do i=1,10
|
||||
!REF: /mm/a
|
||||
!REF: /mm/i
|
||||
!REF: /mm/b
|
||||
!REF: /MM/a
|
||||
!REF: /MM/i
|
||||
!REF: /MM/b
|
||||
a(i) = b(i)
|
||||
end do
|
||||
!$acc end parallel
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
! RUN: %flang_fc1 -fopenmp -fdebug-dump-symbols %s | FileCheck %s
|
||||
! Test that we do not make a private copy of the critical name
|
||||
|
||||
!CHECK: MainProgram scope: mn
|
||||
!CHECK: MainProgram scope: MN
|
||||
!CHECK-NEXT: j size=4 offset=0: ObjectEntity type: INTEGER(4)
|
||||
!CHECK-NEXT: OtherConstruct scope:
|
||||
!CHECK-NEXT: j (OmpPrivate): HostAssoc
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
! RUN: %flang_fc1 -fdebug-dump-symbols -fopenmp -fopenmp-version=50 %s | FileCheck %s
|
||||
|
||||
program main
|
||||
!CHECK-LABEL: MainProgram scope: main
|
||||
!CHECK-LABEL: MainProgram scope: MAIN
|
||||
implicit none
|
||||
|
||||
type ty
|
||||
|
||||
@@ -17,7 +17,7 @@ contains
|
||||
end module mymod
|
||||
|
||||
program omp_examples
|
||||
!CHECK-LABEL: MainProgram scope: omp_examples
|
||||
!CHECK-LABEL: MainProgram scope: OMP_EXAMPLES
|
||||
use mymod
|
||||
implicit none
|
||||
integer, parameter :: n = 100
|
||||
|
||||
@@ -49,7 +49,7 @@ contains
|
||||
end module m1
|
||||
|
||||
program test_vector
|
||||
!CHECK-LABEL: MainProgram scope: test_vector
|
||||
!CHECK-LABEL: MainProgram scope: TEST_VECTOR
|
||||
use vector_mod
|
||||
!CHECK: add_vectors (Function): Use from add_vectors in vector_mod
|
||||
implicit none
|
||||
|
||||
@@ -22,7 +22,7 @@ contains
|
||||
end module module1
|
||||
|
||||
program test_omp_reduction
|
||||
!CHECK: MainProgram scope: test_omp_reduction
|
||||
!CHECK: MainProgram scope: TEST_OMP_REDUCTION
|
||||
use module1, only: t1, operator(.modmul.) => operator(.mul.)
|
||||
|
||||
!CHECK: .modmul. (Function): Use from .mul. in module1
|
||||
|
||||
@@ -31,7 +31,7 @@ function func(x, n, init)
|
||||
end function func
|
||||
|
||||
program main
|
||||
!CHECK-LABEL: MainProgram scope: main
|
||||
!CHECK-LABEL: MainProgram scope: MAIN
|
||||
|
||||
!$omp declare reduction (my_add_red : integer : omp_out = omp_out + omp_in) initializer (omp_priv=0)
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ end subroutine
|
||||
program main
|
||||
use mod1
|
||||
|
||||
!ERROR: The module name or main program name cannot be in a DECLARE TARGET directive
|
||||
!ERROR: The module name cannot be in a DECLARE TARGET directive
|
||||
!$omp declare target (mod1)
|
||||
|
||||
!PORTABILITY: Name 'main' declared in a main program should not have the same name as the main program [-Wbenign-name-clash]
|
||||
!ERROR: The module name or main program name cannot be in a DECLARE TARGET directive
|
||||
! This is now allowed: "main" is implicitly declared symbol separate
|
||||
! from the main program symbol
|
||||
!$omp declare target (main)
|
||||
end
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
! OpenMP Version 4.5
|
||||
! 2.7.1 Schedule Clause
|
||||
! Test that does not catch non constant integer expressions like xx - xx.
|
||||
!DEF: /ompdoschedule MainProgram
|
||||
program ompdoschedule
|
||||
!DEF: /ompdoschedule/a ObjectEntity REAL(4)
|
||||
!DEF: /ompdoschedule/y ObjectEntity REAL(4)
|
||||
!DEF: /ompdoschedule/z ObjectEntity REAL(4)
|
||||
!DEF: /OMPDOSCHEDULE MainProgram
|
||||
program OMPDOSCHEDULE
|
||||
!DEF: /OMPDOSCHEDULE/a ObjectEntity REAL(4)
|
||||
!DEF: /OMPDOSCHEDULE/y ObjectEntity REAL(4)
|
||||
!DEF: /OMPDOSCHEDULE/z ObjectEntity REAL(4)
|
||||
real a(100),y(100),z(100)
|
||||
!DEF: /ompdoschedule/b ObjectEntity INTEGER(4)
|
||||
!DEF: /ompdoschedule/i ObjectEntity INTEGER(4)
|
||||
!DEF: /ompdoschedule/n ObjectEntity INTEGER(4)
|
||||
!DEF: /OMPDOSCHEDULE/b ObjectEntity INTEGER(4)
|
||||
!DEF: /OMPDOSCHEDULE/i ObjectEntity INTEGER(4)
|
||||
!DEF: /OMPDOSCHEDULE/n ObjectEntity INTEGER(4)
|
||||
integer b,i,n
|
||||
!REF: /ompdoschedule/b
|
||||
!REF: /OMPDOSCHEDULE/b
|
||||
b = 10
|
||||
!$omp do schedule(static,b-b)
|
||||
!DEF: /ompdoschedule/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!REF: /ompdoschedule/n
|
||||
!DEF: /OMPDOSCHEDULE/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!REF: /OMPDOSCHEDULE/n
|
||||
do i = 2,n+1
|
||||
!REF: /ompdoschedule/y
|
||||
!REF: /ompdoschedule/OtherConstruct1/i
|
||||
!REF: /ompdoschedule/z
|
||||
!REF: /ompdoschedule/a
|
||||
!REF: /OMPDOSCHEDULE/y
|
||||
!REF: /OMPDOSCHEDULE/OtherConstruct1/i
|
||||
!REF: /OMPDOSCHEDULE/z
|
||||
!REF: /OMPDOSCHEDULE/a
|
||||
y(i) = z(i-1) + a(i)
|
||||
end do
|
||||
!$omp end do
|
||||
end program ompdoschedule
|
||||
end program OMPDOSCHEDULE
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
! The loop iteration variable may not appear in a firstprivate directive.
|
||||
! A positive case
|
||||
|
||||
!DEF: /omp_do MainProgram
|
||||
program omp_do
|
||||
!DEF: /omp_do/i ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO MainProgram
|
||||
program OMP_DO
|
||||
!DEF: /OMP_DO/i ObjectEntity INTEGER(4)
|
||||
integer i
|
||||
|
||||
!$omp do firstprivate(k)
|
||||
!DEF: /omp_do/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
print *, "Hello"
|
||||
end do
|
||||
!$omp end do
|
||||
|
||||
end program omp_do
|
||||
end program OMP_DO
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
! OpenMP Version 4.5
|
||||
! 2.7.1 Do Loop Constructs
|
||||
|
||||
!DEF: /omp_do1 MainProgram
|
||||
program omp_do1
|
||||
!DEF: /omp_do1/i ObjectEntity INTEGER(4)
|
||||
!DEF: /omp_do1/j ObjectEntity INTEGER(4)
|
||||
!DEF: /omp_do1/k (OmpThreadprivate) ObjectEntity INTEGER(4)
|
||||
!DEF: /omp_do1/n (OmpThreadprivate) ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO1 MainProgram
|
||||
program OMP_DO1
|
||||
!DEF: /OMP_DO1/i ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO1/j ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO1/k (OmpThreadprivate) ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO1/n (OmpThreadprivate) ObjectEntity INTEGER(4)
|
||||
integer i, j, k, n
|
||||
!$omp threadprivate (k,n)
|
||||
!$omp do
|
||||
!DEF: /omp_do1/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO1/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!REF: /omp_do1/j
|
||||
!REF: /OMP_DO1/j
|
||||
do j=1,10
|
||||
print *, "Hello"
|
||||
end do
|
||||
end do
|
||||
!$omp end do
|
||||
end program omp_do1
|
||||
end program OMP_DO1
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
! 2.7.1 Loop Construct restrictions on single directive.
|
||||
! A positive case
|
||||
|
||||
!DEF: /omp_do MainProgram
|
||||
program omp_do
|
||||
!DEF: /omp_do/i ObjectEntity INTEGER(4)
|
||||
!DEF: /omp_do/n ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO MainProgram
|
||||
program OMP_DO
|
||||
!DEF: /OMP_DO/i ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO/n ObjectEntity INTEGER(4)
|
||||
integer i,n
|
||||
!$omp parallel
|
||||
!DEF: /omp_do/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!$omp single
|
||||
print *, "hello"
|
||||
@@ -19,13 +19,13 @@ program omp_do
|
||||
|
||||
!$omp parallel default(shared)
|
||||
!$omp do
|
||||
!DEF: /omp_do/OtherConstruct2/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /omp_do/OtherConstruct2/OtherConstruct1/n HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct2/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct2/OtherConstruct1/n HostAssoc INTEGER(4)
|
||||
do i=1,n
|
||||
!$omp parallel
|
||||
!$omp single
|
||||
!DEF: /work EXTERNAL (Subroutine) ProcEntity
|
||||
!DEF: /omp_do/OtherConstruct2/OtherConstruct1/OtherConstruct1/OtherConstruct1/i HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct2/OtherConstruct1/OtherConstruct1/OtherConstruct1/i HostAssoc INTEGER(4)
|
||||
call work(i, 1)
|
||||
!$omp end single
|
||||
!$omp end parallel
|
||||
@@ -34,7 +34,7 @@ program omp_do
|
||||
!$omp end parallel
|
||||
|
||||
!$omp parallel private(i)
|
||||
!DEF: /omp_do/OtherConstruct3/i (OmpPrivate, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct3/i (OmpPrivate, OmpExplicit) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!$omp single
|
||||
print *, "hello"
|
||||
@@ -43,32 +43,32 @@ program omp_do
|
||||
!$omp end parallel
|
||||
|
||||
!$omp target teams distribute parallel do
|
||||
!DEF:/omp_do/OtherConstruct4/i (OmpPrivate ,OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF:/OMP_DO/OtherConstruct4/i (OmpPrivate ,OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,100
|
||||
!REF:/omp_do/OtherConstruct4/i
|
||||
!REF:/OMP_DO/OtherConstruct4/i
|
||||
if(i<10) cycle
|
||||
end do
|
||||
!$omp end target teams distribute parallel do
|
||||
|
||||
!$omp target teams distribute parallel do simd
|
||||
!DEF:/omp_do/OtherConstruct5/i (OmpLinear,OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF:/OMP_DO/OtherConstruct5/i (OmpLinear,OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,100
|
||||
!REF:/omp_do/OtherConstruct5/i
|
||||
!REF:/OMP_DO/OtherConstruct5/i
|
||||
if(i<10) cycle
|
||||
end do
|
||||
!$omp end target teams distribute parallel do simd
|
||||
|
||||
!$omp target teams distribute
|
||||
!DEF: /omp_do/OtherConstruct6/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct6/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,100
|
||||
!REF: /omp_do/OtherConstruct6/i
|
||||
!REF: /OMP_DO/OtherConstruct6/i
|
||||
if(i < 5) cycle
|
||||
end do
|
||||
|
||||
!$omp target teams distribute simd
|
||||
!DEF: /omp_do/OtherConstruct7/i (OmpLinear, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct7/i (OmpLinear, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,100
|
||||
!REF: /omp_do/OtherConstruct7/i
|
||||
!REF: /OMP_DO/OtherConstruct7/i
|
||||
if(i < 5) cycle
|
||||
end do
|
||||
end program omp_do
|
||||
end program OMP_DO
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
! region ever binds to a loop region arising from the loop construct.
|
||||
|
||||
! A positive case
|
||||
!DEF: /omp_do MainProgram
|
||||
program omp_do
|
||||
!DEF: /omp_do/i ObjectEntity INTEGER(4)
|
||||
!DEF: /omp_do/j ObjectEntity INTEGER(4)
|
||||
!DEF: /omp_do/k ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO MainProgram
|
||||
program OMP_DO
|
||||
!DEF: /OMP_DO/i ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO/j ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO/k ObjectEntity INTEGER(4)
|
||||
integer i, j, k
|
||||
!$omp do ordered
|
||||
!DEF: /omp_do/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!$omp ordered
|
||||
!DEF: /my_func EXTERNAL (Subroutine) ProcEntity
|
||||
@@ -20,4 +20,4 @@ program omp_do
|
||||
!$omp end ordered
|
||||
end do
|
||||
!$omp end do
|
||||
end program omp_do
|
||||
end program OMP_DO
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
! OpenMP Version 4.5
|
||||
! 2.7.1 Do Loop Constructs
|
||||
|
||||
!DEF: /omp_do MainProgram
|
||||
program omp_do
|
||||
!DEF: /omp_do/i ObjectEntity INTEGER(4)
|
||||
!DEF: /omp_do/j ObjectEntity INTEGER(4)
|
||||
!DEF: /omp_do/k ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO MainProgram
|
||||
program OMP_DO
|
||||
!DEF: /OMP_DO/i ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO/j ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_DO/k ObjectEntity INTEGER(4)
|
||||
integer i, j, k
|
||||
!$omp do
|
||||
!DEF: /omp_do/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_DO/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!REF: /omp_do/j
|
||||
!REF: /OMP_DO/j
|
||||
do j=1,10
|
||||
!REF: /omp_do/OtherConstruct1/i
|
||||
!REF: /omp_do/j
|
||||
!REF: /OMP_DO/OtherConstruct1/i
|
||||
!REF: /OMP_DO/j
|
||||
print *, "it", i, j
|
||||
end do
|
||||
end do
|
||||
!$omp end do
|
||||
end program omp_do
|
||||
end program OMP_DO
|
||||
|
||||
!DEF: /omp_do2 (Subroutine)Subprogram
|
||||
subroutine omp_do2
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
! OpenMP Version 4.5
|
||||
! 2.7.1 Do Loop constructs.
|
||||
|
||||
!DEF: /omp_cycle MainProgram
|
||||
program omp_cycle
|
||||
!DEF: /OMP_CYCLE MainProgram
|
||||
program OMP_CYCLE
|
||||
!$omp do collapse(1)
|
||||
!DEF: /omp_cycle/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=0,10
|
||||
!REF: /omp_cycle/OtherConstruct1/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct1/i
|
||||
if (i<1) cycle
|
||||
!DEF: /omp_cycle/j (Implicit) ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/j (Implicit) ObjectEntity INTEGER(4)
|
||||
do j=0,10
|
||||
!DEF: /omp_cycle/k (Implicit) ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/k (Implicit) ObjectEntity INTEGER(4)
|
||||
do k=0,10
|
||||
!REF: /omp_cycle/OtherConstruct1/i
|
||||
!REF: /omp_cycle/j
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct1/i
|
||||
!REF: /OMP_CYCLE/j
|
||||
!REF: /OMP_CYCLE/k
|
||||
print *, i, j, k
|
||||
end do
|
||||
end do
|
||||
@@ -23,17 +23,17 @@ program omp_cycle
|
||||
!$omp end do
|
||||
|
||||
!$omp do collapse(1)
|
||||
!DEF: /omp_cycle/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=0,10
|
||||
!REF: /omp_cycle/j
|
||||
!REF: /OMP_CYCLE/j
|
||||
do j=0,10
|
||||
!REF: /omp_cycle/OtherConstruct2/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct2/i
|
||||
if (i<1) cycle
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/k
|
||||
do k=0,10
|
||||
!REF: /omp_cycle/OtherConstruct2/i
|
||||
!REF: /omp_cycle/j
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct2/i
|
||||
!REF: /OMP_CYCLE/j
|
||||
!REF: /OMP_CYCLE/k
|
||||
print *, i, j, k
|
||||
end do
|
||||
end do
|
||||
@@ -41,17 +41,17 @@ program omp_cycle
|
||||
!$omp end do
|
||||
|
||||
!$omp do collapse(2)
|
||||
!DEF: /omp_cycle/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct3/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct3/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do j=0,10
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/k
|
||||
do k=0,10
|
||||
!REF: /omp_cycle/OtherConstruct3/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct3/i
|
||||
if (i<1) cycle
|
||||
!REF: /omp_cycle/OtherConstruct3/i
|
||||
!REF: /omp_cycle/OtherConstruct3/j
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct3/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct3/j
|
||||
!REF: /OMP_CYCLE/k
|
||||
print *, i, j, k
|
||||
end do
|
||||
end do
|
||||
@@ -59,17 +59,17 @@ program omp_cycle
|
||||
!$omp end do
|
||||
|
||||
!$omp do collapse(3)
|
||||
!DEF: /omp_cycle/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct4/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct4/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do j=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct4/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct4/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do k=0,10
|
||||
!REF: /omp_cycle/OtherConstruct4/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct4/i
|
||||
if (i<1) cycle
|
||||
!REF: /omp_cycle/OtherConstruct4/i
|
||||
!REF: /omp_cycle/OtherConstruct4/j
|
||||
!REF: /omp_cycle/OtherConstruct4/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct4/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct4/j
|
||||
!REF: /OMP_CYCLE/OtherConstruct4/k
|
||||
print *, i, j, k
|
||||
end do
|
||||
end do
|
||||
@@ -77,20 +77,20 @@ program omp_cycle
|
||||
!$omp end do
|
||||
|
||||
!$omp do collapse(3)
|
||||
!DEF: /omp_cycle/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo:do i=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct5/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct5/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo1:do j=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct5/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct5/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo2:do k=0,10
|
||||
!REF: /omp_cycle/OtherConstruct5/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct5/i
|
||||
if (i<1) cycle foo2
|
||||
!REF: /omp_cycle/OtherConstruct5/i
|
||||
!REF: /omp_cycle/OtherConstruct5/j
|
||||
!REF: /omp_cycle/OtherConstruct5/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct5/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct5/j
|
||||
!REF: /OMP_CYCLE/OtherConstruct5/k
|
||||
print *, i, j, k
|
||||
end do foo2
|
||||
end do foo1
|
||||
end do foo
|
||||
!$omp end do
|
||||
end program omp_cycle
|
||||
end program OMP_CYCLE
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
! OpenMP Version 4.5
|
||||
! 2.7.1 Do Loop constructs.
|
||||
|
||||
!DEF: /omp_cycle MainProgram
|
||||
program omp_cycle
|
||||
!DEF: /OMP_CYCLE MainProgram
|
||||
program OMP_CYCLE
|
||||
!$omp do collapse(1)
|
||||
!DEF: /omp_cycle/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=0,10
|
||||
cycle
|
||||
!DEF: /omp_cycle/j (Implicit) ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/j (Implicit) ObjectEntity INTEGER(4)
|
||||
do j=0,10
|
||||
!DEF: /omp_cycle/k (Implicit) ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/k (Implicit) ObjectEntity INTEGER(4)
|
||||
do k=0,10
|
||||
!REF: /omp_cycle/OtherConstruct1/i
|
||||
!REF: /omp_cycle/j
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct1/i
|
||||
!REF: /OMP_CYCLE/j
|
||||
!REF: /OMP_CYCLE/k
|
||||
print *, i, j, k
|
||||
end do
|
||||
end do
|
||||
@@ -22,16 +22,16 @@ program omp_cycle
|
||||
!$omp end do
|
||||
|
||||
!$omp do collapse(1)
|
||||
!DEF: /omp_cycle/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=0,10
|
||||
!REF: /omp_cycle/j
|
||||
!REF: /OMP_CYCLE/j
|
||||
do j=0,10
|
||||
cycle
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/k
|
||||
do k=0,10
|
||||
!REF: /omp_cycle/OtherConstruct2/i
|
||||
!REF: /omp_cycle/j
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct2/i
|
||||
!REF: /OMP_CYCLE/j
|
||||
!REF: /OMP_CYCLE/k
|
||||
print *, i, j, k
|
||||
end do
|
||||
end do
|
||||
@@ -39,16 +39,16 @@ program omp_cycle
|
||||
!$omp end do
|
||||
|
||||
!$omp do collapse(2)
|
||||
!DEF: /omp_cycle/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct3/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct3/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do j=0,10
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/k
|
||||
do k=0,10
|
||||
cycle
|
||||
!REF: /omp_cycle/OtherConstruct3/i
|
||||
!REF: /omp_cycle/OtherConstruct3/j
|
||||
!REF: /omp_cycle/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct3/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct3/j
|
||||
!REF: /OMP_CYCLE/k
|
||||
print *, i, j, k
|
||||
end do
|
||||
end do
|
||||
@@ -56,16 +56,16 @@ program omp_cycle
|
||||
!$omp end do
|
||||
|
||||
!$omp do collapse(3)
|
||||
!DEF: /omp_cycle/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct4/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct4/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do j=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct4/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct4/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do k=0,10
|
||||
cycle
|
||||
!REF: /omp_cycle/OtherConstruct4/i
|
||||
!REF: /omp_cycle/OtherConstruct4/j
|
||||
!REF: /omp_cycle/OtherConstruct4/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct4/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct4/j
|
||||
!REF: /OMP_CYCLE/OtherConstruct4/k
|
||||
print *, i, j, k
|
||||
end do
|
||||
end do
|
||||
@@ -73,19 +73,19 @@ program omp_cycle
|
||||
!$omp end do
|
||||
|
||||
!$omp do ordered(3)
|
||||
!DEF: /omp_cycle/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo:do i=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct5/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct5/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo1:do j=0,10
|
||||
!DEF: /omp_cycle/OtherConstruct5/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_CYCLE/OtherConstruct5/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo2:do k=0,10
|
||||
cycle foo2
|
||||
!REF: /omp_cycle/OtherConstruct5/i
|
||||
!REF: /omp_cycle/OtherConstruct5/j
|
||||
!REF: /omp_cycle/OtherConstruct5/k
|
||||
!REF: /OMP_CYCLE/OtherConstruct5/i
|
||||
!REF: /OMP_CYCLE/OtherConstruct5/j
|
||||
!REF: /OMP_CYCLE/OtherConstruct5/k
|
||||
print *, i, j, k
|
||||
end do foo2
|
||||
end do foo1
|
||||
end do foo
|
||||
!$omp end do
|
||||
end program omp_cycle
|
||||
end program OMP_CYCLE
|
||||
|
||||
@@ -2,56 +2,56 @@
|
||||
! OpenMP Version 4.5
|
||||
! 2.7.1 Do Loop constructs.
|
||||
|
||||
!DEF: /test MainProgram
|
||||
program test
|
||||
!DEF: /test/i ObjectEntity INTEGER(4)
|
||||
!DEF: /test/j ObjectEntity INTEGER(4)
|
||||
!DEF: /test/k ObjectEntity INTEGER(4)
|
||||
!DEF: /TEST MainProgram
|
||||
program TEST
|
||||
!DEF: /TEST/i ObjectEntity INTEGER(4)
|
||||
!DEF: /TEST/j ObjectEntity INTEGER(4)
|
||||
!DEF: /TEST/k ObjectEntity INTEGER(4)
|
||||
integer i, j, k
|
||||
!$omp do collapse(2)
|
||||
!DEF: /test/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /TEST/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo: do i=0,10
|
||||
!DEF: /test/OtherConstruct1/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /TEST/OtherConstruct1/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo1: do j=0,10
|
||||
!REF: /test/k
|
||||
!REF: /TEST/k
|
||||
foo2: do k=0,10
|
||||
!REF: /test/OtherConstruct1/i
|
||||
!REF: /TEST/OtherConstruct1/i
|
||||
select case (i)
|
||||
case (5)
|
||||
cycle foo1
|
||||
case (7)
|
||||
cycle foo2
|
||||
end select
|
||||
!REF: /test/OtherConstruct1/i
|
||||
!REF: /test/OtherConstruct1/j
|
||||
!REF: /test/k
|
||||
!REF: /TEST/OtherConstruct1/i
|
||||
!REF: /TEST/OtherConstruct1/j
|
||||
!REF: /TEST/k
|
||||
print *, i, j, k
|
||||
end do foo2
|
||||
end do foo1
|
||||
end do foo
|
||||
|
||||
!$omp do collapse(2)
|
||||
!DEF: /test/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /TEST/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo: do i=0,10
|
||||
!DEF: /test/OtherConstruct2/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /TEST/OtherConstruct2/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
foo1: do j=0,10
|
||||
!REF: /test/k
|
||||
!REF: /TEST/k
|
||||
foo2: do k=0,10
|
||||
!REF: /test/OtherConstruct2/i
|
||||
!REF: /TEST/OtherConstruct2/i
|
||||
if (i<3) then
|
||||
cycle foo1
|
||||
!REF: /test/OtherConstruct2/i
|
||||
!REF: /TEST/OtherConstruct2/i
|
||||
else if (i>8) then
|
||||
cycle foo1
|
||||
else
|
||||
cycle foo2
|
||||
end if
|
||||
!REF: /test/OtherConstruct2/i
|
||||
!REF: /test/OtherConstruct2/j
|
||||
!REF: /test/k
|
||||
!REF: /TEST/OtherConstruct2/i
|
||||
!REF: /TEST/OtherConstruct2/j
|
||||
!REF: /TEST/k
|
||||
print *, i, j, k
|
||||
end do foo2
|
||||
end do foo1
|
||||
end do foo
|
||||
!$omp end do
|
||||
end program test
|
||||
end program TEST
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
! RUN: %flang_fc1 -fdebug-dump-symbols -fopenmp -fopenmp-version=50 %s | FileCheck %s
|
||||
program main
|
||||
!CHECK-LABEL: MainProgram scope: main
|
||||
!CHECK-LABEL: MainProgram scope: MAIN
|
||||
integer, parameter :: n = 256
|
||||
real(8) :: a(256)
|
||||
!$omp target map(mapper(xx), from:a)
|
||||
|
||||
@@ -2,62 +2,62 @@
|
||||
! OpenMP Version 4.5
|
||||
! 2.15.3.6 Reduction Clause Positive cases
|
||||
|
||||
!DEF: /omp_reduction MainProgram
|
||||
program omp_reduction
|
||||
!DEF: /omp_reduction/i ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION MainProgram
|
||||
program OMP_REDUCTION
|
||||
!DEF: /OMP_REDUCTION/i ObjectEntity INTEGER(4)
|
||||
integer i
|
||||
!DEF: /omp_reduction/k ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/k ObjectEntity INTEGER(4)
|
||||
integer :: k = 10
|
||||
!DEF: /omp_reduction/m ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/m ObjectEntity INTEGER(4)
|
||||
integer :: m = 12
|
||||
!$omp parallel do reduction(max:k)
|
||||
!DEF: /omp_reduction/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct1/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /omp_reduction/max ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /omp_reduction/OtherConstruct1/m (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct1/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/max ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct1/m (OmpShared) HostAssoc INTEGER(4)
|
||||
k = max(k, m)
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
!$omp parallel do reduction(min:k)
|
||||
!DEF: /omp_reduction/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct2/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /omp_reduction/min ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /omp_reduction/OtherConstruct2/m (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct2/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/min ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct2/m (OmpShared) HostAssoc INTEGER(4)
|
||||
k = min(k, m)
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
!$omp parallel do reduction(iand:k)
|
||||
!DEF: /omp_reduction/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct3/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /omp_reduction/iand ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /omp_reduction/OtherConstruct3/m (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct3/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/iand ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct3/m (OmpShared) HostAssoc INTEGER(4)
|
||||
k = iand(k, m)
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
!$omp parallel do reduction(ior:k)
|
||||
!DEF: /omp_reduction/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct4/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /omp_reduction/ior ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /omp_reduction/OtherConstruct4/m (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct4/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/ior ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct4/m (OmpShared) HostAssoc INTEGER(4)
|
||||
k = ior(k, m)
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
!$omp parallel do reduction(ieor:k)
|
||||
!DEF: /omp_reduction/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct5/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /omp_reduction/ieor ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /omp_reduction/OtherConstruct5/m (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct5/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/ieor ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct5/m (OmpShared) HostAssoc INTEGER(4)
|
||||
k = ieor(k,m)
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
end program omp_reduction
|
||||
end program OMP_REDUCTION
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
|
||||
! OpenMP Version 4.5
|
||||
! 2.15.3.6 Reduction Clause Positive cases.
|
||||
!DEF: /omp_reduction MainProgram
|
||||
program omp_reduction
|
||||
!DEF: /omp_reduction/i ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION MainProgram
|
||||
program OMP_REDUCTION
|
||||
!DEF: /OMP_REDUCTION/i ObjectEntity INTEGER(4)
|
||||
integer i
|
||||
!DEF: /omp_reduction/k ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/k ObjectEntity INTEGER(4)
|
||||
integer :: k = 10
|
||||
!DEF: /omp_reduction/a ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/a ObjectEntity INTEGER(4)
|
||||
integer a(10)
|
||||
!DEF: /omp_reduction/b ObjectEntity INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/b ObjectEntity INTEGER(4)
|
||||
integer b(10,10,10)
|
||||
|
||||
!$omp parallel shared(k)
|
||||
!$omp do reduction(+:k)
|
||||
!DEF: /omp_reduction/OtherConstruct1/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct1/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct1/OtherConstruct1/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct1/OtherConstruct1/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
k = k+1
|
||||
end do
|
||||
!$omp end do
|
||||
@@ -24,53 +24,53 @@ program omp_reduction
|
||||
|
||||
|
||||
!$omp parallel do reduction(+:a(10))
|
||||
!DEF: /omp_reduction/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct2/k (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct2/k (OmpShared) HostAssoc INTEGER(4)
|
||||
k = k+1
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
|
||||
!$omp parallel do reduction(+:a(1:10:1))
|
||||
!DEF: /omp_reduction/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct3/k (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct3/k (OmpShared) HostAssoc INTEGER(4)
|
||||
k = k+1
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
!$omp parallel do reduction(+:b(1:10:1,1:5,2))
|
||||
!DEF: /omp_reduction/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct4/k (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct4/k (OmpShared) HostAssoc INTEGER(4)
|
||||
k = k+1
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
!$omp parallel do reduction(+:b(1:10:1,1:5,2:5:1))
|
||||
!DEF: /omp_reduction/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct5/k (OmpShared) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct5/k (OmpShared) HostAssoc INTEGER(4)
|
||||
k = k+1
|
||||
end do
|
||||
!$omp end parallel do
|
||||
|
||||
!$omp parallel private(i)
|
||||
!$omp do reduction(+:k) reduction(+:j)
|
||||
!DEF: /omp_reduction/OtherConstruct6/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct6/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct6/OtherConstruct1/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct6/OtherConstruct1/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
k = k+1
|
||||
end do
|
||||
!$omp end do
|
||||
!$omp end parallel
|
||||
|
||||
!$omp do reduction(+:k) reduction(*:j) reduction(+:l)
|
||||
!DEF: /omp_reduction/OtherConstruct7/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct7/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /omp_reduction/OtherConstruct7/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
!DEF: /OMP_REDUCTION/OtherConstruct7/k (OmpReduction, OmpExplicit) HostAssoc INTEGER(4)
|
||||
k = k+1
|
||||
end do
|
||||
!$omp end do
|
||||
end program omp_reduction
|
||||
end program OMP_REDUCTION
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
! RUN: %flang_fc1 -fopenmp -fdebug-dump-symbols -o - %s 2>&1 | FileCheck %s
|
||||
! Check intrinsic reduction symbols (in this case "max" are marked as INTRINSIC
|
||||
|
||||
! CHECK: MainProgram scope: omp_reduction
|
||||
! CHECK: MainProgram scope: OMP_REDUCTION
|
||||
program omp_reduction
|
||||
! CHECK: i size=4 offset=0: ObjectEntity type: INTEGER(4)
|
||||
integer i
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
! RUN: %flang_fc1 -fopenmp -fdebug-dump-symbols -o - %s 2>&1 | FileCheck %s
|
||||
! Check scan reduction
|
||||
|
||||
! CHECK: MainProgram scope: omp_reduction
|
||||
! CHECK: MainProgram scope: OMP_REDUCTION
|
||||
program omp_reduction
|
||||
! CHECK: i size=4 offset=0: ObjectEntity type: INTEGER(4)
|
||||
integer i
|
||||
|
||||
@@ -16,53 +16,53 @@ module md
|
||||
integer :: b
|
||||
end type myty
|
||||
end module md
|
||||
!DEF: /mm MainProgram
|
||||
program mm
|
||||
!DEF: /MM MainProgram
|
||||
program MM
|
||||
!REF: /md
|
||||
use :: md
|
||||
!DEF: /mm/c CommonBlockDetails
|
||||
!DEF: /mm/x (InCommonBlock) ObjectEntity REAL(4)
|
||||
!DEF: /mm/y (InCommonBlock) ObjectEntity REAL(4)
|
||||
!DEF: /MM/c CommonBlockDetails
|
||||
!DEF: /MM/x (InCommonBlock) ObjectEntity REAL(4)
|
||||
!DEF: /MM/y (InCommonBlock) ObjectEntity REAL(4)
|
||||
common /c/x, y
|
||||
!REF: /mm/x
|
||||
!REF: /mm/y
|
||||
!REF: /MM/x
|
||||
!REF: /MM/y
|
||||
real x, y
|
||||
!DEF: /mm/myty Use
|
||||
!DEF: /mm/t ObjectEntity TYPE(myty)
|
||||
!DEF: /MM/myty Use
|
||||
!DEF: /MM/t ObjectEntity TYPE(myty)
|
||||
type(myty) :: t
|
||||
!DEF: /mm/b ObjectEntity INTEGER(4)
|
||||
!DEF: /MM/b ObjectEntity INTEGER(4)
|
||||
integer b(10)
|
||||
!REF: /mm/t
|
||||
!REF: /MM/t
|
||||
!REF: /md/myty/a
|
||||
t%a = 3.14
|
||||
!REF: /mm/t
|
||||
!REF: /MM/t
|
||||
!REF: /md/myty/b
|
||||
t%b = 1
|
||||
!REF: /mm/b
|
||||
!REF: /MM/b
|
||||
b = 2
|
||||
!DEF: /mm/a (Implicit) ObjectEntity REAL(4)
|
||||
!DEF: /MM/a (Implicit) ObjectEntity REAL(4)
|
||||
a = 1.0
|
||||
!DEF: /mm/c (Implicit) ObjectEntity REAL(4)
|
||||
!DEF: /MM/c (Implicit) ObjectEntity REAL(4)
|
||||
c = 2.0
|
||||
!$omp parallel do private(a,t,/c/) shared(c)
|
||||
!DEF: /mm/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
!DEF: /MM/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
|
||||
do i=1,10
|
||||
!DEF: /mm/OtherConstruct1/a (OmpPrivate, OmpExplicit) HostAssoc REAL(4)
|
||||
!DEF: /mm/OtherConstruct1/b (OmpShared) HostAssoc INTEGER(4)
|
||||
!REF: /mm/OtherConstruct1/i
|
||||
!DEF: /MM/OtherConstruct1/a (OmpPrivate, OmpExplicit) HostAssoc REAL(4)
|
||||
!DEF: /MM/OtherConstruct1/b (OmpShared) HostAssoc INTEGER(4)
|
||||
!REF: /MM/OtherConstruct1/i
|
||||
a = a+b(i)
|
||||
!DEF: /mm/OtherConstruct1/t (OmpPrivate, OmpExplicit) HostAssoc TYPE(myty)
|
||||
!DEF: /MM/OtherConstruct1/t (OmpPrivate, OmpExplicit) HostAssoc TYPE(myty)
|
||||
!REF: /md/myty/a
|
||||
!REF: /mm/OtherConstruct1/i
|
||||
!REF: /MM/OtherConstruct1/i
|
||||
t%a = i
|
||||
!DEF: /mm/OtherConstruct1/y (OmpPrivate, OmpExplicit) HostAssoc REAL(4)
|
||||
!DEF: /MM/OtherConstruct1/y (OmpPrivate, OmpExplicit) HostAssoc REAL(4)
|
||||
y = 0.
|
||||
!DEF: /mm/OtherConstruct1/x (OmpPrivate, OmpExplicit) HostAssoc REAL(4)
|
||||
!REF: /mm/OtherConstruct1/a
|
||||
!REF: /mm/OtherConstruct1/i
|
||||
!REF: /mm/OtherConstruct1/y
|
||||
!DEF: /MM/OtherConstruct1/x (OmpPrivate, OmpExplicit) HostAssoc REAL(4)
|
||||
!REF: /MM/OtherConstruct1/a
|
||||
!REF: /MM/OtherConstruct1/i
|
||||
!REF: /MM/OtherConstruct1/y
|
||||
x = a+i+y
|
||||
!DEF: /mm/OtherConstruct1/c (OmpShared, OmpExplicit) HostAssoc REAL(4)
|
||||
!DEF: /MM/OtherConstruct1/c (OmpShared, OmpExplicit) HostAssoc REAL(4)
|
||||
c = 3.0
|
||||
end do
|
||||
end program
|
||||
|
||||
@@ -31,10 +31,10 @@ contains
|
||||
end block
|
||||
end subroutine foo
|
||||
end module mm
|
||||
!DEF: /tt MainProgram
|
||||
program tt
|
||||
!DEF: /TT MainProgram
|
||||
program TT
|
||||
!REF: /mm
|
||||
use :: mm
|
||||
!DEF: /tt/foo (Subroutine) Use
|
||||
!DEF: /TT/foo (Subroutine) Use
|
||||
call foo
|
||||
end program tt
|
||||
end program TT
|
||||
|
||||
@@ -30,8 +30,8 @@ subroutine function_call_in_region
|
||||
!REF: /function_call_in_region/b
|
||||
print *, a, b
|
||||
end subroutine function_call_in_region
|
||||
!DEF: /mm MainProgram
|
||||
program mm
|
||||
!DEF: /MM MainProgram
|
||||
program MM
|
||||
!REF: /function_call_in_region
|
||||
call function_call_in_region
|
||||
end program mm
|
||||
end program MM
|
||||
|
||||
@@ -30,8 +30,8 @@ subroutine function_call_in_region
|
||||
!REF: /function_call_in_region/b
|
||||
print *, a, b
|
||||
end subroutine function_call_in_region
|
||||
!DEF: /mm MainProgram
|
||||
program mm
|
||||
!DEF: /MM MainProgram
|
||||
program MM
|
||||
!REF: /function_call_in_region
|
||||
call function_call_in_region
|
||||
end program mm
|
||||
end program MM
|
||||
|
||||
@@ -10,11 +10,11 @@ program main
|
||||
use mod1
|
||||
integer, parameter :: i = 1
|
||||
|
||||
!ERROR: The module name or main program name cannot be in a THREADPRIVATE directive
|
||||
!ERROR: The module name cannot be in a THREADPRIVATE directive
|
||||
!$omp threadprivate(mod1)
|
||||
|
||||
!PORTABILITY: Name 'main' declared in a main program should not have the same name as the main program [-Wbenign-name-clash]
|
||||
!ERROR: The module name or main program name cannot be in a THREADPRIVATE directive
|
||||
! This is now allowed, since "main" is implicitly declared symbol,
|
||||
! separate from the main program symbol.
|
||||
!$omp threadprivate(main)
|
||||
|
||||
!ERROR: The entity with PARAMETER attribute cannot be in a THREADPRIVATE directive
|
||||
|
||||
@@ -8,7 +8,7 @@ program main
|
||||
end program
|
||||
|
||||
! RUN: %flang_fc1 -fget-symbols-sources %s 2>&1 | FileCheck %s
|
||||
! CHECK:MAIN:{{.*}}getsymbols03-a.f90, 4, 9-13
|
||||
! CHECK:f:{{.*}}getsymbols03-b.f90, 2, 12-13
|
||||
! CHECK:main:{{.*}}getsymbols03-a.f90, 4, 9-13
|
||||
! CHECK:mm3:{{.*}}getsymbols03-a.f90, 5, 6-9
|
||||
! CHECK:x:{{.*}}getsymbols03-a.f90, 6, 13-14
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror -pedantic
|
||||
|
||||
!PORTABILITY: aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffggg1 has length 64, which is greater than the maximum name length 63 [-Wlong-names]
|
||||
!PORTABILITY: AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFFGGG1 has length 64, which is greater than the maximum name length 63 [-Wlong-names]
|
||||
program aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffggg1
|
||||
|
||||
!PORTABILITY: aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffggg2 has length 64, which is greater than the maximum name length 63 [-Wlong-names]
|
||||
|
||||
@@ -125,7 +125,7 @@ program test
|
||||
x = mf(3, "abc", pdt1(1,3)())
|
||||
! call ms(mf)
|
||||
end program
|
||||
!CHECK: MainProgram scope: test size=88 alignment=8
|
||||
!CHECK: MainProgram scope: TEST size=88 alignment=8
|
||||
!CHECK: mf, MODULE (Function): Use from mf in m
|
||||
!CHECK: pdt1: Use from pdt1 in m
|
||||
!CHECK: pdt2: Use from pdt2 in m
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
program m
|
||||
end
|
||||
!ERROR: A source file cannot contain more than one main program
|
||||
!ERROR: 'm' is already declared in this scoping unit
|
||||
!ERROR: 'M' is already declared in this scoping unit
|
||||
program m
|
||||
end
|
||||
|
||||
@@ -7,7 +7,6 @@ module m
|
||||
end module
|
||||
program main
|
||||
use m
|
||||
!PORTABILITY: Name 'main' declared in a main program should not have the same name as the main program [-Wbenign-name-clash]
|
||||
pointer main
|
||||
!ERROR: Cannot change POINTER attribute on use-associated 'mobj'
|
||||
pointer mobj
|
||||
|
||||
@@ -159,35 +159,35 @@ character*1 function tan(x)
|
||||
tan = "?"
|
||||
end function tan
|
||||
|
||||
!DEF: /main MainProgram
|
||||
program main
|
||||
!DEF: /MAIN MainProgram
|
||||
program MAIN
|
||||
!REF: /module1
|
||||
use :: module1
|
||||
!DEF: /main/derived1 Use
|
||||
!DEF: /main/instance ObjectEntity TYPE(derived1)
|
||||
!DEF: /MAIN/derived1 Use
|
||||
!DEF: /MAIN/instance ObjectEntity TYPE(derived1)
|
||||
type(derived1) :: instance
|
||||
!REF: /main/instance
|
||||
!REF: /MAIN/instance
|
||||
!REF: /module1/derived1/p1
|
||||
if (instance%p1(1.)/=2.) print *, "p1 failed"
|
||||
!REF: /main/instance
|
||||
!REF: /MAIN/instance
|
||||
!REF: /module1/derived1/p2
|
||||
if (instance%p2(1.)/=2.) print *, "p2 failed"
|
||||
!REF: /main/instance
|
||||
!REF: /MAIN/instance
|
||||
!REF: /module1/derived1/p3
|
||||
if (.not.instance%p3(1.)) print *, "p3 failed"
|
||||
!REF: /main/instance
|
||||
!REF: /MAIN/instance
|
||||
!REF: /module1/derived1/p4
|
||||
if (.not.instance%p4(1.)) print *, "p4 failed"
|
||||
!REF: /main/instance
|
||||
!REF: /MAIN/instance
|
||||
!REF: /module1/derived1/p5
|
||||
if (instance%p5(1.)/=(5.,6.)) print *, "p5 failed"
|
||||
!REF: /main/instance
|
||||
!REF: /MAIN/instance
|
||||
!REF: /module1/derived1/p6
|
||||
if (instance%p6(1.)/=2.) print *, "p6 failed"
|
||||
!REF: /main/instance
|
||||
!REF: /MAIN/instance
|
||||
!REF: /module1/derived1/p7
|
||||
if (instance%p7(0.)/=1.) print *, "p7 failed"
|
||||
!REF: /main/instance
|
||||
!REF: /MAIN/instance
|
||||
!REF: /module1/derived1/p8
|
||||
if (instance%p8(1.)/="a") print *, "p8 failed"
|
||||
end program main
|
||||
end program MAIN
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
|
||||
program p
|
||||
!PORTABILITY: Name 'p' declared in a main program should not have the same name as the main program [-Wbenign-name-clash]
|
||||
integer :: p
|
||||
end
|
||||
module m
|
||||
|
||||
@@ -43,7 +43,7 @@ contains
|
||||
end subroutine reset
|
||||
end module m2
|
||||
|
||||
!CHECK: MainProgram scope: main
|
||||
!CHECK: MainProgram scope: MAIN
|
||||
!CHECK: i: Use from i in m2
|
||||
!CHECK: i2: Use from i2 in m2
|
||||
!CHECK: init (Subroutine): Use from init in m2
|
||||
@@ -61,4 +61,4 @@ program main
|
||||
else
|
||||
print *, "fail"
|
||||
end if
|
||||
end program main
|
||||
end program main
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
! RUN: %python %S/test_symbols.py %s %flang_fc1
|
||||
! Test host association in internal subroutine of main program.
|
||||
|
||||
!DEF: /main MainProgram
|
||||
program main
|
||||
!DEF: /main/x ObjectEntity INTEGER(4)
|
||||
!DEF: /MAIN MainProgram
|
||||
program MAIN
|
||||
!DEF: /MAIN/x ObjectEntity INTEGER(4)
|
||||
integer x
|
||||
!DEF: /main/s (Subroutine) Subprogram
|
||||
!DEF: /MAIN/s (Subroutine) Subprogram
|
||||
call s
|
||||
contains
|
||||
!REF: /main/s
|
||||
!REF: /MAIN/s
|
||||
subroutine s
|
||||
!DEF: /main/s/y (Implicit) ObjectEntity REAL(4)
|
||||
!DEF: /main/s/x HostAssoc INTEGER(4)
|
||||
!DEF: /MAIN/s/y (Implicit) ObjectEntity REAL(4)
|
||||
!DEF: /MAIN/s/x HostAssoc INTEGER(4)
|
||||
y = x
|
||||
contains
|
||||
!DEF: /main/s/s2 (Subroutine) Subprogram
|
||||
!DEF: /MAIN/s/s2 (Subroutine) Subprogram
|
||||
subroutine s2
|
||||
!DEF: /main/s/s2/z (Implicit) ObjectEntity REAL(4)
|
||||
!DEF: /main/s/s2/x HostAssoc INTEGER(4)
|
||||
!DEF: /MAIN/s/s2/z (Implicit) ObjectEntity REAL(4)
|
||||
!DEF: /MAIN/s/s2/x HostAssoc INTEGER(4)
|
||||
z = x
|
||||
end subroutine
|
||||
end subroutine
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
! RUN: %python %S/test_symbols.py %s %flang_fc1
|
||||
!DEF: /main MainProgram
|
||||
program main
|
||||
!DEF: /main/t1 DerivedType
|
||||
!DEF: /MAIN MainProgram
|
||||
program MAIN
|
||||
!DEF: /MAIN/t1 DerivedType
|
||||
type :: t1
|
||||
!DEF: /main/t1/a1 ObjectEntity INTEGER(4)
|
||||
!DEF: /MAIN/t1/a1 ObjectEntity INTEGER(4)
|
||||
integer :: a1
|
||||
end type
|
||||
!REF: /main/t1
|
||||
!DEF: /main/t2 DerivedType
|
||||
!REF: /MAIN/t1
|
||||
!DEF: /MAIN/t2 DerivedType
|
||||
type, extends(t1) :: t2
|
||||
!DEF: /main/t2/a2 ObjectEntity INTEGER(4)
|
||||
!DEF: /MAIN/t2/a2 ObjectEntity INTEGER(4)
|
||||
integer :: a2
|
||||
end type
|
||||
!REF: /main/t2
|
||||
!DEF: /main/t3 DerivedType
|
||||
!REF: /MAIN/t2
|
||||
!DEF: /MAIN/t3 DerivedType
|
||||
type, extends(t2) :: t3
|
||||
!DEF: /main/t3/a3 ObjectEntity INTEGER(4)
|
||||
!DEF: /MAIN/t3/a3 ObjectEntity INTEGER(4)
|
||||
integer :: a3
|
||||
end type
|
||||
!REF: /main/t3
|
||||
!DEF: /main/x3 ObjectEntity TYPE(t3)
|
||||
!REF: /MAIN/t3
|
||||
!DEF: /MAIN/x3 ObjectEntity TYPE(t3)
|
||||
type(t3) :: x3
|
||||
!DEF: /main/i ObjectEntity INTEGER(4)
|
||||
!DEF: /MAIN/i ObjectEntity INTEGER(4)
|
||||
integer i
|
||||
!REF: /main/i
|
||||
!REF: /main/x3
|
||||
!REF: /main/t2/a2
|
||||
!REF: /MAIN/i
|
||||
!REF: /MAIN/x3
|
||||
!REF: /MAIN/t2/a2
|
||||
i = x3%a2
|
||||
!REF: /main/i
|
||||
!REF: /main/x3
|
||||
!REF: /main/t1/a1
|
||||
!REF: /MAIN/i
|
||||
!REF: /MAIN/x3
|
||||
!REF: /MAIN/t1/a1
|
||||
i = x3%a1
|
||||
!REF: /main/i
|
||||
!REF: /main/x3
|
||||
!DEF: /main/t3/t2 (ParentComp) ObjectEntity TYPE(t2)
|
||||
!REF: /main/t2/a2
|
||||
!REF: /MAIN/i
|
||||
!REF: /MAIN/x3
|
||||
!DEF: /MAIN/t3/t2 (ParentComp) ObjectEntity TYPE(t2)
|
||||
!REF: /MAIN/t2/a2
|
||||
i = x3%t2%a2
|
||||
!REF: /main/i
|
||||
!REF: /main/x3
|
||||
!REF: /main/t3/t2
|
||||
!REF: /main/t1/a1
|
||||
!REF: /MAIN/i
|
||||
!REF: /MAIN/x3
|
||||
!REF: /MAIN/t3/t2
|
||||
!REF: /MAIN/t1/a1
|
||||
i = x3%t2%a1
|
||||
!REF: /main/i
|
||||
!REF: /main/x3
|
||||
!DEF: /main/t2/t1 (ParentComp) ObjectEntity TYPE(t1)
|
||||
!REF: /main/t1/a1
|
||||
!REF: /MAIN/i
|
||||
!REF: /MAIN/x3
|
||||
!DEF: /MAIN/t2/t1 (ParentComp) ObjectEntity TYPE(t1)
|
||||
!REF: /MAIN/t1/a1
|
||||
i = x3%t1%a1
|
||||
!REF: /main/i
|
||||
!REF: /main/x3
|
||||
!REF: /main/t3/t2
|
||||
!REF: /main/t2/t1
|
||||
!REF: /main/t1/a1
|
||||
!REF: /MAIN/i
|
||||
!REF: /MAIN/x3
|
||||
!REF: /MAIN/t3/t2
|
||||
!REF: /MAIN/t2/t1
|
||||
!REF: /MAIN/t1/a1
|
||||
i = x3%t2%t1%a1
|
||||
end program
|
||||
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
! RUN: %python %S/test_symbols.py %s %flang_fc1
|
||||
!DEF: /main MainProgram
|
||||
program main
|
||||
!DEF: /MAIN MainProgram
|
||||
program MAIN
|
||||
implicit complex(z)
|
||||
!DEF: /main/t DerivedType
|
||||
!DEF: /MAIN/t DerivedType
|
||||
type :: t
|
||||
!DEF: /main/t/re ObjectEntity REAL(4)
|
||||
!DEF: /MAIN/t/re ObjectEntity REAL(4)
|
||||
real :: re
|
||||
!DEF: /main/t/im ObjectEntity REAL(4)
|
||||
!DEF: /MAIN/t/im ObjectEntity REAL(4)
|
||||
real :: im
|
||||
end type
|
||||
!DEF: /main/z1 ObjectEntity COMPLEX(4)
|
||||
!DEF: /MAIN/z1 ObjectEntity COMPLEX(4)
|
||||
complex z1
|
||||
!REF: /main/t
|
||||
!DEF: /main/w ObjectEntity TYPE(t)
|
||||
!REF: /MAIN/t
|
||||
!DEF: /MAIN/w ObjectEntity TYPE(t)
|
||||
type(t) :: w
|
||||
!DEF: /main/x ObjectEntity REAL(4)
|
||||
!DEF: /main/y ObjectEntity REAL(4)
|
||||
!DEF: /MAIN/x ObjectEntity REAL(4)
|
||||
!DEF: /MAIN/y ObjectEntity REAL(4)
|
||||
real x, y
|
||||
!REF: /main/x
|
||||
!REF: /main/z1
|
||||
!REF: /MAIN/x
|
||||
!REF: /MAIN/z1
|
||||
x = z1%re
|
||||
!REF: /main/y
|
||||
!REF: /main/z1
|
||||
!REF: /MAIN/y
|
||||
!REF: /MAIN/z1
|
||||
y = z1%im
|
||||
!DEF: /main/z2 (Implicit) ObjectEntity COMPLEX(4)
|
||||
!REF: /main/x
|
||||
!DEF: /MAIN/z2 (Implicit) ObjectEntity COMPLEX(4)
|
||||
!REF: /MAIN/x
|
||||
z2%re = x
|
||||
!REF: /main/z2
|
||||
!REF: /main/y
|
||||
!REF: /MAIN/z2
|
||||
!REF: /MAIN/y
|
||||
z2%im = y
|
||||
!REF: /main/x
|
||||
!REF: /main/w
|
||||
!REF: /main/t/re
|
||||
!REF: /MAIN/x
|
||||
!REF: /MAIN/w
|
||||
!REF: /MAIN/t/re
|
||||
x = w%re
|
||||
!REF: /main/y
|
||||
!REF: /main/w
|
||||
!REF: /main/t/im
|
||||
!REF: /MAIN/y
|
||||
!REF: /MAIN/w
|
||||
!REF: /MAIN/t/im
|
||||
y = w%im
|
||||
end program
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
! RUN: %python %S/test_symbols.py %s %flang_fc1
|
||||
!DEF: /main MainProgram
|
||||
program main
|
||||
!DEF: /main/x POINTER ObjectEntity REAL(4)
|
||||
!DEF: /MAIN MainProgram
|
||||
program MAIN
|
||||
!DEF: /MAIN/x POINTER ObjectEntity REAL(4)
|
||||
pointer :: x
|
||||
!REF: /main/x
|
||||
!REF: /MAIN/x
|
||||
real x
|
||||
!DEF: /main/y EXTERNAL, POINTER (Function) ProcEntity REAL(4)
|
||||
!DEF: /MAIN/y EXTERNAL, POINTER (Function) ProcEntity REAL(4)
|
||||
pointer :: y
|
||||
!REF: /main/y
|
||||
!REF: /MAIN/y
|
||||
procedure (real) :: y
|
||||
!DEF: /main/z (Implicit) ObjectEntity REAL(4)
|
||||
!REF: /main/y
|
||||
!DEF: /MAIN/z (Implicit) ObjectEntity REAL(4)
|
||||
!REF: /MAIN/y
|
||||
z = y()
|
||||
end program
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user