mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 14:16:42 +00:00

Patch 2/3 of the transition step 1 described in https://discourse.llvm.org/t/rfc-enabling-the-hlfir-lowering-by-default/72778/7. All the modified tests are still here since coverage for the direct lowering to FIR was still needed while it was default. Some already have an HLFIR version, some have not and will need to be ported in step 2 described in the RFC. Note that another 147 lit tests use -emit-fir/-emit-llvm outputs but do not need a flag since the HLFIR/no HLFIR output is the same for what is being tested.
20 lines
624 B
Fortran
20 lines
624 B
Fortran
! RUN: bbc -hlfir=false -o - %s | FileCheck %s
|
|
|
|
! CHECK-LABEL: func @_QMw0bPtest1(
|
|
! CHECK: %[[TWO:.*]] = arith.constant 2 : index
|
|
! CHECK: %[[HEAP:.*]] = fir.allocmem !fir.array<?x!fir.logical<4>>, %[[TWO]] {uniq_name = ".array.expr"}
|
|
! CHECK: fir.freemem %[[HEAP]] : !fir.heap<!fir.array<?x!fir.logical<4>>>
|
|
|
|
Module w0b
|
|
Integer,Parameter :: a(*,*) = Reshape( [ 1,2,3,4 ], [ 2,2 ])
|
|
contains
|
|
Subroutine test1(i,expect)
|
|
Integer,Intent(In) :: i,expect(:)
|
|
Logical :: ok = .True.
|
|
If (Any(a(:,i)/=expect)) Then
|
|
!Print *,'FAIL 1:',a(:,i),'/=',expect
|
|
ok = .False.
|
|
End If
|
|
End Subroutine
|
|
End Module
|