<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - crash on x86_64-linux-gnu (Assertion `isa<T>(CanonicalType)' failed.)"
   href="https://llvm.org/bugs/show_bug.cgi?id=30456">30456</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>crash on x86_64-linux-gnu (Assertion `isa<T>(CanonicalType)' failed.)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>chengniansun@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ clang-trunk -v
clang version 4.0.0 (trunk 281908) (llvm/trunk 281907)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$ clang-trunk small.c
clang-4.0:
/tmp/llvm-builder/llvm-source-trunk/tools/clang/include/clang/AST/Type.h:5941:
const T* clang::Type::castAs() const [with T = clang::PointerType]: Assertion
`isa<T>(CanonicalType)' failed.
#0 0x0000000001c9e155 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-4.0+0x1c9e155)
#1 0x0000000001c9c0fe llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-4.0+0x1c9c0fe)
#2 0x0000000001c9c262 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-4.0+0x1c9c262)
#3 0x00007fb1437fa340 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#4 0x00007fb1425ebcc9 gsignal
/build/eglibc-3GlaMS/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007fb1425ef0d8 abort
/build/eglibc-3GlaMS/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007fb1425e4b86 __assert_fail_base
/build/eglibc-3GlaMS/eglibc-2.19/assert/assert.c:92:0
#7 0x00007fb1425e4c32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#8 0x0000000001f2c13b clang::PointerType const*
clang::Type::castAs<clang::PointerType>() const
(/usr/local/clang-trunk/bin/clang-4.0+0x1f2c13b)
#9 0x000000000322b8c9 (anonymous
namespace)::IntExprEvaluator::VisitCallExpr(clang::CallExpr const*)
(/usr/local/clang-trunk/bin/clang-4.0+0x322b8c9)
#10 0x000000000322cd91 clang::StmtVisitorBase<clang::make_const_ptr, (anonymous
namespace)::IntExprEvaluator, bool>::Visit(clang::Stmt const*)
(/usr/local/clang-trunk/bin/clang-4.0+0x322cd91)
#11 0x0000000003221150 Evaluate(clang::APValue&, (anonymous
namespace)::EvalInfo&, clang::Expr const*)
(/usr/local/clang-trunk/bin/clang-4.0+0x3221150)
#12 0x00000000032228d1 EvaluateAsRValue((anonymous namespace)::EvalInfo&,
clang::Expr const*, clang::APValue&)
(/usr/local/clang-trunk/bin/clang-4.0+0x32228d1)
#13 0x0000000003222bac clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&,
clang::ASTContext const&) const [clone .part.1962]
(/usr/local/clang-trunk/bin/clang-4.0+0x3222bac)
#14 0x0000000003222c3e clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&,
clang::ASTContext const&) const
(/usr/local/clang-trunk/bin/clang-4.0+0x3222c3e)
#15 0x000000000204c40c
clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(clang::FunctionDecl const*,
unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot)
(/usr/local/clang-trunk/bin/clang-4.0+0x204c40c)
#16 0x0000000001f85c47
clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*,
clang::CodeGen::ReturnValueSlot)
(/usr/local/clang-trunk/bin/clang-4.0+0x1f85c47)
#17 0x000000000086b676 (anonymous
namespace)::ScalarExprEmitter::VisitCallExpr(clang::CallExpr const*)
(/usr/local/clang-trunk/bin/clang-4.0+0x86b676)
#18 0x0000000001faa2b9 (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/usr/local/clang-trunk/bin/clang-4.0+0x1faa2b9)
#19 0x0000000001fab063
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
(/usr/local/clang-trunk/bin/clang-4.0+0x1fab063)
#20 0x0000000001f732c7 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr
const*, clang::CodeGen::AggValueSlot, bool)
(/usr/local/clang-trunk/bin/clang-4.0+0x1f732c7)
#21 0x0000000001f83fdb
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*)
(/usr/local/clang-trunk/bin/clang-4.0+0x1f83fdb)
#22 0x0000000001e34d89 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*) (/usr/local/clang-trunk/bin/clang-4.0+0x1e34d89)
#23 0x0000000001e35bd7
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
(/usr/local/clang-trunk/bin/clang-4.0+0x1e35bd7)
#24 0x0000000001e5c7f4
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&,
clang::Stmt const*) (/usr/local/clang-trunk/bin/clang-4.0+0x1e5c7f4)
#25 0x0000000001e66bae
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
(/usr/local/clang-trunk/bin/clang-4.0+0x1e66bae)
#26 0x0000000001e874fb
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/local/clang-trunk/bin/clang-4.0+0x1e874fb)
#27 0x0000000001e9a5f1
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/local/clang-trunk/bin/clang-4.0+0x1e9a5f1)
#28 0x0000000001e9b9d0
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
(/usr/local/clang-trunk/bin/clang-4.0+0x1e9b9d0)
#29 0x0000000001e9c111
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) [clone
.part.5735] (/usr/local/clang-trunk/bin/clang-4.0+0x1e9c111)
#30 0x00000000024026b3 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/usr/local/clang-trunk/bin/clang-4.0+0x24026b3)
#31 0x00000000023fc74d
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(/usr/local/clang-trunk/bin/clang-4.0+0x23fc74d)
#32 0x00000000027d4026 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-4.0+0x27d4026)
#33 0x00000000023fd3fe clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-4.0+0x23fd3fe)
#34 0x0000000002110bd6 clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-4.0+0x2110bd6)
#35 0x00000000020eb2de
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-4.0+0x20eb2de)
#36 0x00000000021987c6
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-4.0+0x21987c6)
#37 0x0000000000a8c9f8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-4.0+0xa8c9f8)
#38 0x0000000000a35401 main (/usr/local/clang-trunk/bin/clang-4.0+0xa35401)
#39 0x00007fb1425d6ec5 __libc_start_main
/build/eglibc-3GlaMS/eglibc-2.19/csu/libc-start.c:321:0
#40 0x0000000000a88a1e _start (/usr/local/clang-trunk/bin/clang-4.0+0xa88a1e)
Stack dump:
0.      Program arguments: /usr/local/clang-trunk/bin/clang-4.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
small.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-resource-dir /usr/local/clang-trunk/bin/../lib/clang/4.0.0 -c-isystem .
-c-isystem /usr/local/include/csmith -c-isystem /usr/local/include/csmith
-internal-isystem /usr/local/include -internal-isystem
/usr/local/clang-trunk/bin/../lib/clang/4.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdebug-compilation-dir
/home/cnsun/workspace/meta-compiler/error-fuzzer/exp-runs/crash/RandomTokenManipulationFuzzingEngine/20160915-clang-trunk--Weverything-O3-c-std=c11-build-155612
-ferror-limit 19 -fmessage-length 127 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/small-c1a718.o -x c
small.c 
1.      <eof> parser at end of file
2.      small.c:1:6: LLVM IR generation of declaration 'ds'
3.      small.c:1:6: Generating code for declaration 'ds'
clang-4.0: error: unable to execute command: Aborted (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 281908) (llvm/trunk 281907)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-4.0: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-4.0: note: diagnostic msg: /tmp/small-ac36ad.c
clang-4.0: note: diagnostic msg: /tmp/small-ac36ad.sh
clang-4.0: note: diagnostic msg: 

********************

$ cat small.c 
void ds() { __atomic_is_lock_free(2, ds); }
$</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>