summaryrefslogtreecommitdiff
path: root/flang/test/Lower/global-format-strings.f90
blob: d9307abd7473196fd85f3d2cfbaaa99443f8809e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! RUN: bbc -emit-fir -o - %s | FileCheck %s

! Test checks whether the text of the format statement is hashconed into a
! global similar to a CHARACTER literal and then referenced.

program other
  write(10, 1008)
  ! CHECK:  fir.address_of(@{{.*}}) :
1008 format('ok')
end
! CHECK-LABEL: fir.global internal @_QQcl.28276F6B2729 constant
! CHECK: %[[lit:.*]] = fir.string_lit "('ok')"(6) : !fir.char<1,6>
! CHECK: fir.has_value %[[lit]] : !fir.char<1,6>
! CHECK: }