[llvm-bugs] [Bug 32900] New: Unreachable with __unknown_anytype in CodeGen: "Unexpected placeholder builtin type!"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 2 21:41:37 PDT 2017


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

            Bug ID: 32900
           Summary: Unreachable with __unknown_anytype in CodeGen:
                    "Unexpected placeholder builtin type!"
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: george.burgess.iv at gmail.com
                CC: llvm-bugs at lists.llvm.org

repro on trunk:

$ echo '__unknown_anytype foo; __unknown_anytype bar = foo;' | $clang -cc1 -x
c++ -o - -S -emit-llvm - -funknown-anytype

Unexpected placeholder builtin type!
UNREACHABLE executed at ../../tools/clang/lib/CodeGen/CodeGenTypes.cpp:484!
#0 0x0000000001cd5a44 PrintStackTraceSignalHandler(void*)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x1cd5a44)
#1 0x0000000001cd5d56 SignalHandler(int)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x1cd5d56)
#2 0x00007f0216e6a330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x00007f0215a5ac37 gsignal
/build/eglibc-MjiXCM/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x00007f0215a5e028 abort
/build/eglibc-MjiXCM/eglibc-2.19/stdlib/abort.c:91:0
#5 0x0000000001c8d0cd llvm::llvm_unreachable_internal(char const*, char const*,
unsigned int) (/path/to/clang/llvm/llvm/build/release/bin/clang+0x1c8d0cd)
#6 0x0000000001f4725f
clang::CodeGen::CodeGenTypes::ConvertType(clang::QualType)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x1f4725f)
#7 0x0000000001f466e0
clang::CodeGen::CodeGenTypes::ConvertTypeForMem(clang::QualType)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x1f466e0)
#8 0x0000000001e8beb7
clang::CodeGen::CodeGenModule::EmitNullConstant(clang::QualType)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x1e8beb7)
#9 0x0000000001efb7bc
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*,
bool) (/path/to/clang/llvm/llvm/build/release/bin/clang+0x1efb7bc)
#10 0x0000000001ef69e0
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x1ef69e0)
#11 0x0000000001efdb31
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x1efdb31)
#12 0x000000000256ef10 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x256ef10)
#13 0x000000000256c42c
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x256c42c)
#14 0x0000000002a140a4 clang::ParseAST(clang::Sema&, bool, bool)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x2a140a4)
#15 0x0000000002221898 clang::FrontendAction::Execute()
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x2221898)
#16 0x00000000021e5d51
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x21e5d51)
#17 0x00000000022ab1f5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x22ab1f5)
#18 0x000000000083c299 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/path/to/clang/llvm/llvm/build/release/bin/clang+0x83c299)
#19 0x000000000083a742 main
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x83a742)
#20 0x00007f0215a45f45 __libc_start_main
/build/eglibc-MjiXCM/eglibc-2.19/csu/libc-start.c:321:0
#21 0x0000000000837439 _start
(/path/to/clang/llvm/llvm/build/release/bin/clang+0x837439)
Stack dump:
0.      Program arguments: /path/to/clang/llvm/llvm/build/release/bin/clang
-cc1 -x c++ -o - -S -emit-llvm - -funknown-anytype
1.      <stdin>:1:24: current parser token '__unknown_anytype'
2.      <stdin>:1:19: LLVM IR generation of declaration 'foo'
3.      <stdin>:1:19: Generating code for declaration 'foo'

-- 
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/20170503/94184658/attachment.html>


More information about the llvm-bugs mailing list