Created
August 19, 2023 22:44
-
-
Save saethlin/2f9af215fab6214da1dcc3bcc4168e06 to your computer and use it in GitHub Desktop.
Reduced LLVM reproducer for "conflicting locations for variable" assertion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'reduced.bc' | |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
define void @_ZN8scratch211find_frames17hd54c2d9c7be04b4aE() !dbg !16 { | |
%1 = alloca { ptr, ptr, i64 }, i32 0, align 8 | |
%2 = alloca [7 x i8], i32 0, align 1 | |
call void @llvm.dbg.declare(metadata ptr %2, metadata !20, metadata !DIExpression(DW_OP_LLVM_fragment, 456, 56)), !dbg !25 | |
call void @llvm.dbg.declare(metadata ptr %1, metadata !20, metadata !DIExpression()), !dbg !25 | |
store i64 0, ptr null, align 8, !dbg !26 | |
ret void | |
} | |
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) | |
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0 | |
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } | |
!llvm.module.flags = !{!0} | |
!llvm.dbg.cu = !{!1, !4, !6, !8, !10, !12, !14} | |
!0 = !{i32 2, !"Debug Info Version", i32 3} | |
!1 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !2, producer: "clang LLVM (rustc version 1.73.0-dev)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, splitDebugInlining: false) | |
!2 = !DIFile(filename: "src/lib.rs/@/scratch2.5b843ac0d209e8fd-cgu.02", directory: "/home/ben/scratch2") | |
!3 = !{} | |
!4 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !5, producer: "clang LLVM (rustc version 1.73.0-dev)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false) | |
!5 = !DIFile(filename: "src/lib.rs/@/scratch2.5b843ac0d209e8fd-cgu.05", directory: "/home/ben/scratch2") | |
!6 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !7, producer: "clang LLVM (rustc version 1.73.0-dev)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false) | |
!7 = !DIFile(filename: "src/lib.rs/@/scratch2.5b843ac0d209e8fd-cgu.12", directory: "/home/ben/scratch2") | |
!8 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !9, producer: "clang LLVM (rustc version 1.73.0-dev)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false) | |
!9 = !DIFile(filename: "src/lib.rs/@/scratch2.5b843ac0d209e8fd-cgu.14", directory: "/home/ben/scratch2") | |
!10 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !11, producer: "clang LLVM (rustc version 1.73.0-dev)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false) | |
!11 = !DIFile(filename: "src/lib.rs/@/scratch2.5b843ac0d209e8fd-cgu.16", directory: "/home/ben/scratch2") | |
!12 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !13, producer: "clang LLVM (rustc version 1.73.0-dev)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false) | |
!13 = !DIFile(filename: "src/lib.rs/@/scratch2.5b843ac0d209e8fd-cgu.17", directory: "/home/ben/scratch2") | |
!14 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !15, producer: "clang LLVM (rustc version 1.73.0-dev)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false) | |
!15 = !DIFile(filename: "src/lib.rs/@/scratch2.5b843ac0d209e8fd-cgu.20", directory: "/home/ben/scratch2") | |
!16 = distinct !DISubprogram(name: "find_frames", linkageName: "_ZN8scratch211find_frames17hd54c2d9c7be04b4aE", scope: !18, file: !17, line: 427, type: !19, scopeLine: 427, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, retainedNodes: !3) | |
!17 = !DIFile(filename: "src/lib.rs", directory: "/home/ben/scratch2", checksumkind: CSK_MD5, checksum: "b29646fd33bd2e06ee1feec5a635e47a") | |
!18 = !DINamespace(name: "scratch2", scope: null) | |
!19 = !DISubroutineType(types: !3) | |
!20 = !DILocalVariable(name: "continuation", scope: !21, file: !17, line: 433, type: !23, align: 8) | |
!21 = distinct !DILexicalBlock(scope: !22, file: !17, line: 433, column: 9) | |
!22 = distinct !DILexicalBlock(scope: !16, file: !17, line: 431, column: 5) | |
!23 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "LoopingLookup<core::result::Result<scratch2::FrameIter, gimli::read::Error>, scratch2::MappedLookup<core::result::Result<(core::option::Option<&scratch2::function::Function>, core::option::Option<scratch2::Location>), gimli::read::Error>, scratch2::SimpleLookup<core::result::Result<(scratch2::DebugFile, &gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, &gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), gimli::read::Error>, gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, scratch2::{impl#7}::dwarf_and_unit_dwo::{closure_env#1}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>, scratch2::{impl#7}::find_function_or_location::{closure_env#0}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>, scratch2::{impl#1}::find_frames::{closure_env#0}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>", scope: !18, file: !24, size: 896, align: 64, elements: !3, templateParams: !3, identifier: "b12b08ee9dcfd627d0c8fb586a7d3a89") | |
!24 = !DIFile(filename: "<unknown>", directory: "") | |
!25 = !DILocation(line: 433, column: 13, scope: !21) | |
!26 = !DILocation(line: 1606, column: 13, scope: !27, inlinedAt: !34) | |
!27 = distinct !DISubprogram(name: "get_or_insert<core::result::Result<core::option::Option<alloc::boxed::Box<(alloc::sync::Arc<gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, alloc::alloc::Global>, gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), alloc::alloc::Global>>, gimli::read::Error>>", linkageName: "_ZN4core6option15Option$LT$T$GT$13get_or_insert17h1bf652f47952dd74E", scope: !29, file: !28, line: 1604, type: !32, scopeLine: 1604, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, declaration: !33, retainedNodes: !3) | |
!28 = !DIFile(filename: "/home/ben/rust-master/library/core/src/option.rs", directory: "", checksumkind: CSK_MD5, checksum: "61984cc37be76fbe350219edd311210e") | |
!29 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Option<core::result::Result<core::option::Option<alloc::boxed::Box<(alloc::sync::Arc<gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, alloc::alloc::Global>, gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), alloc::alloc::Global>>, gimli::read::Error>>", scope: !30, file: !24, size: 128, align: 64, elements: !3, templateParams: !3, identifier: "f216f6a891fd47be8370a8c8e9be7995") | |
!30 = !DINamespace(name: "option", scope: !31) | |
!31 = !DINamespace(name: "core", scope: null) | |
!32 = distinct !DISubroutineType(types: !3) | |
!33 = !DISubprogram(name: "get_or_insert<core::result::Result<core::option::Option<alloc::boxed::Box<(alloc::sync::Arc<gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, alloc::alloc::Global>, gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), alloc::alloc::Global>>, gimli::read::Error>>", linkageName: "_ZN4core6option15Option$LT$T$GT$13get_or_insert17h1bf652f47952dd74E", scope: !29, file: !28, line: 1604, type: !32, scopeLine: 1604, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagOptimized, templateParams: !3) | |
!34 = !DILocation(line: 420, column: 25, scope: !35, inlinedAt: !41) | |
!35 = distinct !DILexicalBlock(scope: !36, file: !17, line: 419, column: 9) | |
!36 = distinct !DILexicalBlock(scope: !37, file: !17, line: 414, column: 9) | |
!37 = distinct !DISubprogram(name: "borrow_with<core::result::Result<core::option::Option<alloc::boxed::Box<(alloc::sync::Arc<gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, alloc::alloc::Global>, gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), alloc::alloc::Global>>, gimli::read::Error>, scratch2::{impl#7}::dwarf_and_unit_dwo::{closure#1}::{closure_env#0}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>", linkageName: "_ZN8scratch217LazyCell$LT$T$GT$11borrow_with17hbba9ed7846aef49cE", scope: !38, file: !17, line: 413, type: !39, scopeLine: 413, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, declaration: !40, retainedNodes: !3) | |
!38 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "LazyCell<core::result::Result<core::option::Option<alloc::boxed::Box<(alloc::sync::Arc<gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, alloc::alloc::Global>, gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), alloc::alloc::Global>>, gimli::read::Error>>", scope: !18, file: !24, size: 128, align: 64, elements: !3, templateParams: !3, identifier: "4ccb1074f7f81179c46407ea92294f53") | |
!39 = distinct !DISubroutineType(types: !3) | |
!40 = !DISubprogram(name: "borrow_with<core::result::Result<core::option::Option<alloc::boxed::Box<(alloc::sync::Arc<gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, alloc::alloc::Global>, gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), alloc::alloc::Global>>, gimli::read::Error>, scratch2::{impl#7}::dwarf_and_unit_dwo::{closure#1}::{closure_env#0}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>", linkageName: "_ZN8scratch217LazyCell$LT$T$GT$11borrow_with17hbba9ed7846aef49cE", scope: !38, file: !17, line: 413, type: !39, scopeLine: 413, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagOptimized, templateParams: !3) | |
!41 = !DILocation(line: 336, column: 36, scope: !42, inlinedAt: !46) | |
!42 = distinct !DISubprogram(name: "{closure#1}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>", linkageName: "_ZN8scratch216ResUnit$LT$R$GT$18dwarf_and_unit_dwo28_$u7b$$u7b$closure$u7d$$u7d$17h39278a6fc477e6a6E", scope: !43, file: !17, line: 335, type: !45, scopeLine: 335, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, retainedNodes: !3) | |
!43 = !DINamespace(name: "dwarf_and_unit_dwo", scope: !44) | |
!44 = !DINamespace(name: "{impl#7}", scope: !18) | |
!45 = distinct !DISubroutineType(types: !3) | |
!46 = !DILocation(line: 210, column: 30, scope: !47, inlinedAt: !50) | |
!47 = distinct !DISubprogram(name: "resume<core::result::Result<(scratch2::DebugFile, &gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, &gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), gimli::read::Error>, gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, scratch2::{impl#7}::dwarf_and_unit_dwo::{closure_env#1}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>", linkageName: "_ZN88_$LT$scratch2..SimpleLookup$LT$T$C$R$C$F$GT$$u20$as$u20$scratch2..LookupContinuation$GT$6resume17hdebe0a2c92fced50E", scope: !48, file: !17, line: 209, type: !49, scopeLine: 209, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, retainedNodes: !3) | |
!48 = !DINamespace(name: "{impl#3}", scope: !18) | |
!49 = distinct !DISubroutineType(types: !3) | |
!50 = !DILocation(line: 232, column: 29, scope: !51, inlinedAt: !54) | |
!51 = distinct !DISubprogram(name: "resume<core::result::Result<(core::option::Option<&scratch2::function::Function>, core::option::Option<scratch2::Location>), gimli::read::Error>, scratch2::SimpleLookup<core::result::Result<(scratch2::DebugFile, &gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, &gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), gimli::read::Error>, gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, scratch2::{impl#7}::dwarf_and_unit_dwo::{closure_env#1}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>, scratch2::{impl#7}::find_function_or_location::{closure_env#0}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>", linkageName: "_ZN88_$LT$scratch2..MappedLookup$LT$T$C$L$C$F$GT$$u20$as$u20$scratch2..LookupContinuation$GT$6resume17h90719b55afe8bca0E", scope: !52, file: !17, line: 231, type: !53, scopeLine: 231, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, retainedNodes: !3) | |
!52 = !DINamespace(name: "{impl#4}", scope: !18) | |
!53 = distinct !DISubroutineType(types: !3) | |
!54 = !DILocation(line: 295, column: 35, scope: !55, inlinedAt: !58) | |
!55 = distinct !DISubprogram(name: "resume<core::result::Result<scratch2::FrameIter, gimli::read::Error>, scratch2::MappedLookup<core::result::Result<(core::option::Option<&scratch2::function::Function>, core::option::Option<scratch2::Location>), gimli::read::Error>, scratch2::SimpleLookup<core::result::Result<(scratch2::DebugFile, &gimli::read::dwarf::Dwarf<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>, &gimli::read::dwarf::Unit<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, usize>), gimli::read::Error>, gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>, scratch2::{impl#7}::dwarf_and_unit_dwo::{closure_env#1}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>, scratch2::{impl#7}::find_function_or_location::{closure_env#0}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>, scratch2::{impl#1}::find_frames::{closure_env#0}<gimli::read::endian_slice::EndianSlice<gimli::endianity::LittleEndian>>>", linkageName: "_ZN89_$LT$scratch2..LoopingLookup$LT$T$C$L$C$F$GT$$u20$as$u20$scratch2..LookupContinuation$GT$6resume17hb9c53bff51504308E", scope: !56, file: !17, line: 294, type: !57, scopeLine: 294, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !1, templateParams: !3, retainedNodes: !3) | |
!56 = !DINamespace(name: "{impl#6}", scope: !18) | |
!57 = distinct !DISubroutineType(types: !3) | |
!58 = !DILocation(line: 438, column: 26, scope: !21) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment