1*2d10258aSAlok Kumar Sharma;; This test checks dataLocation field of DICompositeType 2*2d10258aSAlok Kumar Sharma 3*2d10258aSAlok Kumar Sharma; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s 4*2d10258aSAlok Kumar Sharma 5*2d10258aSAlok Kumar Sharma;; Test whether DW_AT_data_location is generated. 6*2d10258aSAlok Kumar Sharma; CHECK: !DICompositeType(tag: DW_TAG_array_type, baseType: !{{[0-9]+}}, size: 32, align: 32, elements: !{{[0-9]+}}, dataLocation: !{{[0-9]+}}, associated: !{{[0-9]+}}) 7*2d10258aSAlok Kumar Sharma; CHECK: !DICompositeType(tag: DW_TAG_array_type, baseType: !{{[0-9]+}}, size: 32, align: 32, elements: !{{[0-9]+}}, dataLocation: !DIExpression(DW_OP_push_object_address, DW_OP_deref), associated: !DIExpression(DW_OP_push_object_address, DW_OP_deref)) 8*2d10258aSAlok Kumar Sharma 9*2d10258aSAlok Kumar Sharma; ModuleID = 'associated.f90' 10*2d10258aSAlok Kumar Sharmasource_filename = "/dir/associated.ll" 11*2d10258aSAlok Kumar Sharma 12*2d10258aSAlok Kumar Sharma!llvm.module.flags = !{!0, !1} 13*2d10258aSAlok Kumar Sharma!llvm.dbg.cu = !{!2} 14*2d10258aSAlok Kumar Sharma 15*2d10258aSAlok Kumar Sharma!0 = !{i32 2, !"Dwarf Version", i32 4} 16*2d10258aSAlok Kumar Sharma!1 = !{i32 2, !"Debug Info Version", i32 3} 17*2d10258aSAlok Kumar Sharma!2 = distinct !DICompileUnit(language: DW_LANG_Fortran90, file: !3, producer: " F90 Flang - 1.5 2017-05-01", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !4, imports: !4) 18*2d10258aSAlok Kumar Sharma!3 = !DIFile(filename: "associated.f90", directory: "/dir") 19*2d10258aSAlok Kumar Sharma!4 = !{} 20*2d10258aSAlok Kumar Sharma!5 = !{!6, !17} 21*2d10258aSAlok Kumar Sharma!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 32, align: 32, elements: !8, dataLocation: !10, associated: !15) 22*2d10258aSAlok Kumar Sharma!7 = !DIBasicType(name: "integer", size: 32, align: 32, encoding: DW_ATE_signed) 23*2d10258aSAlok Kumar Sharma!8 = !{!9} 24*2d10258aSAlok Kumar Sharma!9 = !DISubrange(count: 19, lowerBound: 2) 25*2d10258aSAlok Kumar Sharma!10 = distinct !DILocalVariable(scope: !11, file: !3, type: !14, flags: DIFlagArtificial) 26*2d10258aSAlok Kumar Sharma!11 = distinct !DISubprogram(name: "main", scope: !2, file: !3, line: 1, type: !12, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagMainSubprogram, unit: !2) 27*2d10258aSAlok Kumar Sharma!12 = !DISubroutineType(cc: DW_CC_program, types: !13) 28*2d10258aSAlok Kumar Sharma!13 = !{null} 29*2d10258aSAlok Kumar Sharma!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32) 30*2d10258aSAlok Kumar Sharma!15 = distinct !DILocalVariable(scope: !11, file: !3, type: !16, flags: DIFlagArtificial) 31*2d10258aSAlok Kumar Sharma!16 = !DIBasicType(name: "logical", size: 32, align: 32, encoding: DW_ATE_signed) 32*2d10258aSAlok Kumar Sharma!17 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 32, align: 32, elements: !8, dataLocation: !DIExpression(DW_OP_push_object_address, DW_OP_deref), associated: !DIExpression(DW_OP_push_object_address, DW_OP_deref)) 33