[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Integration / debug-char-type-1.f90
blob5068663aa9e28e189a4259ed963cb0ce8bc377df
1 ! RUN: %flang_fc1 -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck %s
3 module helper
4 character(len=40) :: str
5 character(len=:), allocatable :: str2
6 end module helper
8 program test
9 use helper
10 character(kind=4, len=8) :: first
11 character(len=10) :: second
12 first = '3.14 = π'
13 second = 'Fortran'
14 str = 'Hello World!'
15 str2 = 'A quick brown fox jumps over a lazy dog'
16 end program test
18 ! CHECK-DAG: !DIGlobalVariable(name: "str"{{.*}}type: ![[TY40:[0-9]+]]{{.*}})
19 ! CHECK-DAG: ![[TY40]] = !DIStringType(size: 320, encoding: DW_ATE_ASCII)
20 ! CHECK-DAG: !DIGlobalVariable(name: "str2"{{.*}}type: ![[TY:[0-9]+]]{{.*}})
21 ! CHECK-DAG: ![[TY]] = !DIStringType(stringLengthExpression: !DIExpression(DW_OP_push_object_address, DW_OP_plus_uconst, 8), stringLocationExpression: !DIExpression(DW_OP_push_object_address, DW_OP_deref), encoding: DW_ATE_ASCII)
22 ! CHECK-DAG: !DILocalVariable(name: "first"{{.*}}type: ![[TY8:[0-9]+]])
23 ! CHECK-DAG: ![[TY8]] = !DIStringType(size: 256, encoding: DW_ATE_UCS)
24 ! CHECK-DAG: !DILocalVariable(name: "second"{{.*}}type: ![[TY10:[0-9]+]])
25 ! CHECK-DAG: ![[TY10]] = !DIStringType(size: 80, encoding: DW_ATE_ASCII)