<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Regression in SVN r344120, "[DebugInfo][Dexter] Unreachable line stepped onto after SimplifyCFG.""
   href="https://bugs.llvm.org/show_bug.cgi?id=39243">39243</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression in SVN r344120, "[DebugInfo][Dexter] Unreachable line stepped onto after SimplifyCFG."
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Transformation Utilities
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>martin@martin.st
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20985" name="attach_20985" title="Reproduction sample">attachment 20985</a> <a href="attachment.cgi?id=20985&action=edit" title="Reproduction sample">[details]</a></span>
Reproduction sample

After SVN r344120, "[DebugInfo][Dexter] Unreachable line stepped onto after
SimplifyCFG.", compiling some files that worked before now trigger asserts.

With the attached source file, compiling with "clang -target i686-w64-mingw32
-c strtodg-8790a8.c -O2 -g" will fail like this:

$ clang -target i686-w64-mingw32 -c strtodg-8790a8.c -O2 -g
mismatched subprogram between llvm.dbg.value variable and !dbg attachment
  call void @llvm.dbg.value(metadata i32 %79, metadata !646, metadata
!DIExpression()) #5, !dbg !652
label %if.then284
i32 (i8*, i8**, %struct.FPI*, i32*, i32*)* @__strtodg
!646 = !DILocalVariable(name: "ret", scope: !647, file: !45, line: 490, type:
!26)
!647 = distinct !DISubprogram(name: "__lo0bits_D2A", scope: !45, file: !45,
line: 488, type: !648, isLocal: true, isDefinition: true, scopeLine: 489,
flags: DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !650)
!652 = !DILocation(line: 263, column: 7, scope: !634, inlinedAt: !642)
!634 = distinct !DISubprogram(name: "mantbits", scope: !30, file: !30, line:
260, type: !635, isLocal: true, isDefinition: true, scopeLine: 261, flags:
DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !639)
mismatched subprogram between llvm.dbg.value variable and !dbg attachment
  call void @llvm.dbg.value(metadata i32 %82, metadata !666, metadata
!DIExpression()) #5, !dbg !663
label %if.then284
i32 (i8*, i8**, %struct.FPI*, i32*, i32*)* @__strtodg
!666 = !DILocalVariable(name: "ret", scope: !667, file: !45, line: 490, type:
!26)
!667 = distinct !DISubprogram(name: "__lo0bits_D2A", scope: !45, file: !45,
line: 488, type: !668, isLocal: true, isDefinition: true, scopeLine: 489,
flags: DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !670)
!663 = !DILocation(line: 263, column: 7, scope: !629, inlinedAt: !637)
!629 = distinct !DISubprogram(name: "mantbits", scope: !30, file: !30, line:
260, type: !630, isLocal: true, isDefinition: true, scopeLine: 261, flags:
DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !634)
clang-8: ../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7513: llvm::SDDbgValue*
llvm::SelectionDAG::getDbgValue(llvm::DIVariable*, llvm::DIExpression*,
llvm::SDNode*, unsigned int, bool, const llvm::DebugLoc&, unsigned int):
Assertion `cast<DILocalVariable>(Var)->isValidLocationForIntrinsic(DL) &&
"Expected inlined-at fields to agree"' failed.
Stack dump:
0.      Program arguments: /home/martin/code/llvm-bisect/build/bin/clang-8 -cc1
-triple i686-w64-windows-gnu -emit-obj -disable-free -main-file-name
strtodg-8790a8.c -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -target-cpu pentium4 -dwarf-column-info
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb
-momit-leaf-frame-pointer -coverage-notes-file /tmp/strtodg-8790a8.gcno
-resource-dir /home/martin/code/llvm-bisect/build/lib/clang/8.0.0
-internal-isystem /home/martin/code/llvm-bisect/build/lib/clang/8.0.0/include
-internal-isystem /usr/i686-w64-mingw32/sys-root/mingw/include
-internal-isystem /usr/i686-w64-mingw32/include -internal-isystem /usr/include
-O2 -fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 275
-fno-use-cxa-atexit -fobjc-runtime=gcc -fdwarf-exceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o strtodg-8790a8.o -x c strtodg-8790a8.c -faddrsig 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'strtodg-8790a8.c'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@__strtodg'
#0 0x0000000001aa4b6a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1aa4b6a)
#1 0x0000000001aa2efc llvm::sys::RunSignalHandlers()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1aa2efc)
#2 0x0000000001aa3067 SignalHandler(int)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1aa3067)
#3 0x00007fe9759d9390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007fe97474b428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007fe97474d02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007fe974743bd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007fe974743c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x0000000002353643 llvm::SelectionDAG::getDbgValue(llvm::DIVariable*,
llvm::DIExpression*, llvm::SDNode*, unsigned int, bool, llvm::DebugLoc const&,
unsigned int) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x2353643)
#9 0x0000000002309d23 llvm::SelectionDAGBuilder::getDbgValue(llvm::SDValue,
llvm::DILocalVariable*, llvm::DIExpression*, llvm::DebugLoc const&, unsigned
int) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x2309d23)
#10 0x0000000002344313
llvm::SelectionDAGBuilder::visitIntrinsicCall(llvm::CallInst const&, unsigned
int) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x2344313)
#11 0x0000000002347307 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst
const&) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x2347307)
#12 0x000000000234e76f llvm::SelectionDAGBuilder::visit(llvm::Instruction
const&) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x234e76f)
#13 0x00000000023999a9
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction,
true, false, void>, false, true>,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, true>, bool&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x23999a9)
#14 0x00000000023a1e76
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x23a1e76)
#15 0x00000000023a41d1
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.853.constprop.876)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x23a41d1)
#16 0x0000000000d83f94 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0xd83f94)
#17 0x000000000121da31
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(.part.34.constprop.35)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x121da31)
#18 0x00000000015c6f8c llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x15c6f8c)
#19 0x00000000015c716c llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x15c716c)
#20 0x00000000015c8289 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x15c8289)
#21 0x0000000001c889bd (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1c889bd)
#22 0x0000000001c8a2b7 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x1c8a2b7)
#23 0x0000000002469ee7
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x2469ee7)
#24 0x0000000002d05349 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x2d05349)
#25 0x000000000246925f clang::CodeGenAction::ExecuteAction()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x246925f)
#26 0x00000000020ea4ae clang::FrontendAction::Execute()
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x20ea4ae)
#27 0x00000000020b3f9e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x20b3f9e)
#28 0x000000000218bdf1
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x218bdf1)
#29 0x000000000096a1d8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/code/llvm-bisect/build/bin/clang-8+0x96a1d8)
#30 0x00000000008fe7b6 main
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x8fe7b6)
#31 0x00007fe974736830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#32 0x0000000000966019 _start
(/home/martin/code/llvm-bisect/build/bin/clang-8+0x966019)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>