1 // RUN: tco %s | FileCheck %s
2 // RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck %s
4 // CHECK-LABEL: @character_literal1
5 func.func @character_literal1() -> !fir.char<1,13> {
6 %0 = fir.string_lit "Hello, World!"(13) : !fir.char<1,13>
7 // CHECK: ret [13 x i8] c"Hello, World!"
8 return %0 : !fir.char<1,13>
11 // CHECK-LABEL: @character_literal2
12 func.func @character_literal2() -> !fir.char<2,2> {
13 %0 = fir.string_lit [234, 456](2) : !fir.char<2,2>
14 // CHECK: ret [2 x i16] [i16 234, i16 456]
15 return %0 : !fir.char<2,2>
18 // CHECK-LABEL: @character_literal4
19 func.func @character_literal4() -> !fir.char<4,3> {
20 %0 = fir.string_lit [89123, 999256, 4](3) : !fir.char<4,3>
21 // CHECK: ret [3 x i32] [i32 89123, i32 999256, i32 4]
22 return %0 : !fir.char<4,3>