llvm-project/flang/test/Lower/character-compare.f90
Valentin Clement c1e7296354
[flang][NFC] Add character lowering tests
This patch some lowering tests for characters related operations.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D122310

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
2022-03-23 15:28:29 +01:00

11 lines
262 B
Fortran

! RUN: bbc %s -o - | FileCheck %s
! CHECK-LABEL: compare
subroutine compare(x, c1, c2)
character(len=4) c1, c2
logical x
! CHECK: %[[RES:.*]] = fir.call @_FortranACharacterCompareScalar1
! CHECK: cmpi slt, %[[RES]],
x = c1 < c2
end subroutine compare