[llvm-bugs] [Bug 30499] New: UNREACHABLE executed at ../include/llvm/Analysis/MemoryLocation.h:81

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 22 13:51:03 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30499

            Bug ID: 30499
           Summary: UNREACHABLE executed at
                    ../include/llvm/Analysis/MemoryLocation.h:81
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: hans at chromium.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

With trunk Clang:

$ cat /tmp/a.ii
long fn1() __attribute__((__pure__));
void fn2() {
  char *a;
  int b;
  *a = 0;
  if (b)
    b = fn1();
  *a = 0;
}

$ bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -target-cpu x86-64
-O2 -std=gnu++11 /tmp/a.ii

unsupported memory instruction
UNREACHABLE executed at ../include/llvm/Analysis/MemoryLocation.h:81!
#0 0x0000000001cb3b55 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(bin/clang+0x1cb3b55)
#1 0x0000000001cb1afe llvm::sys::RunSignalHandlers() (bin/clang+0x1cb1afe)
#2 0x0000000001cb1c62 SignalHandler(int) (bin/clang+0x1cb1c62)
#3 0x00007fc0f7010330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007fc0f5e04c37 gsignal
/build/eglibc-oGUzwX/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007fc0f5e08028 abort
/build/eglibc-oGUzwX/eglibc-2.19/stdlib/abort.c:91:0
#6 0x0000000001c6b075 (bin/clang+0x1c6b075)
#7 0x0000000001b5552b (anonymous
namespace)::GVNHoist::hasEHOrLoadsOnPath(llvm::Instruction const*,
llvm::MemoryDef*, int&) (bin/clang+0x1b5552b)
#8 0x0000000001b56e0c (anonymous
namespace)::GVNHoist::safeToHoistLdSt(llvm::Instruction const*,
llvm::Instruction const*, llvm::MemoryUseOrDef*, (anonymous
namespace)::GVNHoist::InsKind, int&) [clone .constprop.453]
(bin/clang+0x1b56e0c)
#9 0x0000000001b5729c (anonymous
namespace)::GVNHoist::computeInsertionPoints(llvm::DenseMap<std::pair<unsigned
int, unsigned int>, llvm::SmallVector<llvm::Instruction*, 4u>,
llvm::DenseMapInfo<std::pair<unsigned int, unsigned int> >,
llvm::detail::DenseMapPair<std::pair<unsigned int, unsigned int>,
llvm::SmallVector<llvm::Instruction*, 4u> > > const&,
llvm::SmallVector<std::pair<llvm::BasicBlock*,
llvm::SmallVector<llvm::Instruction*, 4u> >, 4u>&, (anonymous
namespace)::GVNHoist::InsKind) [clone .constprop.446] (bin/clang+0x1b5729c)
#10 0x0000000001b57f07 (anonymous namespace)::GVNHoist::run(llvm::Function&)
(bin/clang+0x1b57f07)
#11 0x0000000001b5921b (anonymous
namespace)::GVNHoistLegacyPass::runOnFunction(llvm::Function&)
(bin/clang+0x1b5921b)
#12 0x000000000192db03 llvm::FPPassManager::runOnFunction(llvm::Function&)
(bin/clang+0x192db03)
#13 0x000000000192dc67
llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&)
(bin/clang+0x192dc67)
#14 0x000000000192dd34 llvm::legacy::FunctionPassManager::run(llvm::Function&)
(bin/clang+0x192dd34)
#15 0x0000000001e142d2 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
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> >) (bin/clang+0x1e142d2)
#16 0x00000000024165b8
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(bin/clang+0x24165b8)
#17 0x00000000027ed732 clang::ParseAST(clang::Sema&, bool, bool)
(bin/clang+0x27ed732)
#18 0x00000000024169ae clang::CodeGenAction::ExecuteAction()
(bin/clang+0x24169ae)
#19 0x0000000002129456 clang::FrontendAction::Execute() (bin/clang+0x2129456)
#20 0x0000000002103d2e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(bin/clang+0x2103d2e)
#21 0x00000000021b0ec6
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(bin/clang+0x21b0ec6)
#22 0x0000000000a93338 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (bin/clang+0xa93338)
#23 0x0000000000a3be81 main (bin/clang+0xa3be81)
#24 0x00007fc0f5deff45 __libc_start_main
/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321:0
#25 0x0000000000a8f35e _start (bin/clang+0xa8f35e)
Stack dump:
0.      Program arguments: bin/clang -cc1 -triple x86_64-unknown-linux-gnu
-emit-obj -target-cpu x86-64 -O2 -std=gnu++11 /tmp/a.ii 
1.      <eof> parser at end of file
2.      Per-function optimization
3.      Running pass 'Early GVN Hoisting of Expressions' on function '@_Z3fn2v'
Aborted (core dumped)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160922/6fe04243/attachment.html>


More information about the llvm-bugs mailing list