xref: /llvm-project/flang/test/Fir/annotate-constant.fir (revision a8308020ac2fce5ad7d616b2dbdbe7ccae0585a4)
1// RUN: fir-opt -annotate-constant %s | FileCheck %s
2
3// CHECK-LABEL: func @annotate_test() -> !fir.ref<!fir.array<?xi32>> {
4func.func @annotate_test() -> !fir.ref<!fir.array<?xi32>> {
5  %1 = arith.constant 5 : index
6  // CHECK: %[[a:.*]] = fir.alloca !fir.array<?xi32>, %{{.*}} {canonicalize_constant_operands = [5 : index]}
7  %2 = fir.alloca !fir.array<?xi32>, %1
8  return %2 : !fir.ref<!fir.array<?xi32>>
9}
10