brintos

brintos / llvm-project-archived public Read only

0
0
Text · 804 B · 728dce9 Raw
26 lines · plain
1! RUN: bbc -emit-hlfir -fopenmp -o - %s | FileCheck %s2! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s | FileCheck %s3 4program firstprivateallocatable5  Integer, Allocatable :: a,u6  a = 1377 8  !$omp parallel firstprivate(a,u)9  u = a**210  !$omp end parallel11end program12 13 14! CHECK-LABEL:   func.func @_QQmain()15! [...]16! CHECK:           omp.parallel {{.*}} {17! [...]18! CHECK:             %[[VAL_50:.*]] = arith.constant 2 : i3219! CHECK:             %[[VAL_51:.*]] = math.ipowi %{{.*}}, %[[VAL_50]] : i3220! this is what we are really checking: the hlfir.assign must have realloc so that21! u is allocated when the assignment occurs22! CHECK:             hlfir.assign %[[VAL_51]] to %{{.*}}#0 realloc : i32, !fir.ref<!fir.box<!fir.heap<i32>>>23! [...]24! CHECK:             omp.terminator25! CHECK:           }26