36 lines · plain
1; RUN: opt -passes=verify -disable-output <%s 2>&1 | FileCheck %s2;3; This test creates an invalid vector by defining multiple elements for the4; vector's DICompositeType definition. A vector should only have one element5; in its DICompositeType 'elements' array.6;7; CHECK: invalid vector8 9@f.foo = private unnamed_addr constant <6 x float> zeroinitializer, align 3210 11define void @f() {12 %1 = alloca <6 x float>, align 3213 #dbg_declare(ptr %1, !10, !DIExpression(), !18)14 ret void15}16 17 18!llvm.dbg.cu = !{!0}19!llvm.module.flags = !{!3, !4}20 21!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)22!1 = !DIFile(filename: "test.c", directory: "/dbg/info")23!2 = !{}24!3 = !{i32 2, !"Dwarf Version", i32 4}25!4 = !{i32 2, !"Debug Info Version", i32 3}26!7 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)27!8 = !DISubroutineType(types: !9)28!9 = !{null}29!10 = !DILocalVariable(name: "foo", scope: !7, file: !1, line: 4, type: !12)30!12 = !DICompositeType(tag: DW_TAG_array_type, baseType: !13, size: 256, flags: DIFlagVector, elements: !14)31!13 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)32!14 = !{!15, !19}33!15 = !DISubrange(count: 6)34!18 = !DILocation(line: 4, column: 48, scope: !7)35!19 = !DISubrange(count: 42)36