<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 since SVN r360902, "Resubmit: [Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed""
   href="https://bugs.llvm.org/show_bug.cgi?id=41931">41931</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Regression since SVN r360902, "Resubmit: [Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed"
          </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>efriedma@quicinc.com, llvm-bugs@lists.llvm.org, paul.robinson@am.sony.com, stephen.tozer@sony.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21968" name="attach_21968" title="Reduced reproduction sample">attachment 21968</a> <a href="attachment.cgi?id=21968&action=edit" title="Reduced reproduction sample">[details]</a></span>
Reduced reproduction sample

Since SVN r360902, "Resubmit: [Salvage] Change salvage debug info
implementation to use DW_OP_LLVM_convert where needed", compilation of libtiff
for arm fails with the following failed assert:

clang-9: ../lib/IR/DebugInfoMetadata.cpp:1098: static
llvm::Optional<llvm::DIExpression*>
llvm::DIExpression::createFragmentExpression(const llvm::DIExpression*,
unsigned int, unsigned int): Assertion `(OffsetInBits + SizeInBits <=
FragmentSizeInBits) && "new fragment outside of original fragment"' failed.
Stack dump:
0.      Program arguments: /home/martin/clang-nightly-sat/bin/clang-9 -cc1
-triple armv7-unknown-linux-gnueabihf -emit-obj -disable-free -main-file-name
tif_aux.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu
generic -target-abi aapcs-linux -mfloat-abi hard
-fallow-half-arguments-and-returns -dwarf-column-info -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file
/home/martin/code/reduce-tiff/tif_aux.gcno -resource-dir
/home/martin/clang-nightly-sat/lib/clang/9.0.0 -internal-isystem
/usr/local/include -internal-isystem
/home/martin/clang-nightly-sat/lib/clang/9.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdebug-compilation-dir /home/martin/code/reduce-tiff -ferror-limit 19
-fmessage-length 0 -fno-signed-char -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o tif_aux.o -x c tif_aux.c -faddrsig 
1.      <eof> parser at end of file
2.      Code generation 
3.      Running pass 'Function Pass Manager' on module 'tif_aux.c'.
4.      Running pass 'ARM Instruction Selection' on function '@h'
 #0 0x000055aba333b57a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/clang-nightly-sat/bin/clang-9+0x1e9b57a) 
 #1 0x000055aba3339224 llvm::sys::RunSignalHandlers()
(/home/martin/clang-nightly-sat/bin/clang-9+0x1e99224) 
 #2 0x000055aba3339362 (/home/martin/clang-nightly-sat/bin/clang-9+0x1e99362) 
 #3 0x00007f8784cd2890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) 
 #4 0x00007f8783983e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0 
 #5 0x00007f8783985801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007f878397539a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007f8783975412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x000055aba2d8567e (/home/martin/clang-nightly-sat/bin/clang-9+0x18e567e)
 #9 0x000055aba3de9618
llvm::SelectionDAGBuilder::EmitFuncArgumentDbgValue(llvm::Value const*,
llvm::DILocalVariable*, llvm::DIExpression*, llvm::DILocation*, bool,
llvm::SDValue const&) (/home/martin/clang-nightly-sat/bin/clang-9+0x2949618)
#10 0x000055aba3df2a6d llvm::SelectionDAGBuilder::handleDebugValue(llvm::Value
const*, llvm::DILocalVariable*, llvm::DIExpression*, llvm::DebugLoc,
llvm::DebugLoc, unsigned int)
(/home/martin/clang-nightly-sat/bin/clang-9+0x2952a6d)
#11 0x000055aba3e1e97f
llvm::SelectionDAGBuilder::visitIntrinsicCall(llvm::CallInst const&, unsigned
int) (/home/martin/clang-nightly-sat/bin/clang-9+0x297e97f)
#12 0x000055aba3e21d20 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst
const&) (/home/martin/clang-nightly-sat/bin/clang-9+0x2981d20)
#13 0x000055aba3e29aaf llvm::SelectionDAGBuilder::visit(llvm::Instruction
const&) (/home/martin/clang-nightly-sat/bin/clang-9+0x2989aaf)
#14 0x000055aba3e7ebef
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/clang-nightly-sat/bin/clang-9+0x29debef)
#15 0x000055aba3e83a49
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/martin/clang-nightly-sat/bin/clang-9+0x29e3a49)
#16 0x000055aba3e85c88 (/home/martin/clang-nightly-sat/bin/clang-9+0x29e5c88) 
#17 0x000055aba218ce24 (/home/martin/clang-nightly-sat/bin/clang-9+0xcece24)
#18 0x000055aba2a1676e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/martin/clang-nightly-sat/bin/clang-9+0x157676e) 
#19 0x000055aba2df9f39 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/martin/clang-nightly-sat/bin/clang-9+0x1959f39)
#20 0x000055aba2dfa031 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/martin/clang-nightly-sat/bin/clang-9+0x195a031)
#21 0x000055aba2df9191 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/martin/clang-nightly-sat/bin/clang-9+0x1959191)
#22 0x000055aba35485df 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/clang-nightly-sat/bin/clang-9+0x20a85df) 
#23 0x000055aba3f67b38 (/home/martin/clang-nightly-sat/bin/clang-9+0x2ac7b38)
#24 0x000055aba48a9a09 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/clang-nightly-sat/bin/clang-9+0x3409a09)
#25 0x000055aba3f667a8 clang::CodeGenAction::ExecuteAction()
(/home/martin/clang-nightly-sat/bin/clang-9+0x2ac67a8)
#26 0x000055aba39f990e clang::FrontendAction::Execute()
(/home/martin/clang-nightly-sat/bin/clang-9+0x255990e)
#27 0x000055aba39bbfa6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/clang-nightly-sat/bin/clang-9+0x251bfa6)
#28 0x000055aba3a9f55d
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/clang-nightly-sat/bin/clang-9+0x25ff55d)
#29 0x000055aba20bb808 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/clang-nightly-sat/bin/clang-9+0xc1b808)
#30 0x000055aba2053f31 main
(/home/martin/clang-nightly-sat/bin/clang-9+0xbb3f31)
#31 0x00007f8783966b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0 
#32 0x000055aba20b75fa _start
(/home/martin/clang-nightly-sat/bin/clang-9+0xc175fa)


To reproduce, compile the attached file like this:

$ clang -target armv7-linux-gnueabihf -c -O2 -g tif_aux.c</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>