<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 --- - __builtin_isnan(...) causes a segfault"
href="https://llvm.org/bugs/show_bug.cgi?id=23086">23086</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__builtin_isnan(...) causes a segfault
</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>Linux
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>charlesturner7c5@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14125" name="attach_14125" title="clang-3.7: note: diagnostic msg: /tmp/bug-a187e8.sh">attachment 14125</a> <a href="attachment.cgi?id=14125&action=edit" title="clang-3.7: note: diagnostic msg: /tmp/bug-a187e8.sh">[details]</a></span>
clang-3.7: note: diagnostic msg: /tmp/bug-a187e8.sh
The following source file causes a segfault in trunk clang,
--------------8<--------------
__builtin_isnan(..._);
-------------->8--------------
bug.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
__builtin_isnan(...);
^
bug.c:1:17: error: ISO C requires a named parameter before '...'
__builtin_isnan(...);
^
0 libLLVMSupport.so.3.7 0x00007f69bfc5f648
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1 libLLVMSupport.so.3.7 0x00007f69bfc5e629
2 libc.so.6 0x00007f69be419150
3 libclangSema.so.3.7 0x00007f69baa83c75
clang::Sema::MergeFunctionDecl(clang::FunctionDecl*, clang::NamedDecl*&, clang
::Scope*, bool) + 8165
4 libclangSema.so.3.7 0x00007f69baa954cf
clang::Sema::CheckFunctionDeclaration(clang::Scope*, clang::FunctionDecl*, cla
ng::LookupResult&, bool) + 1423
5 libclangSema.so.3.7 0x00007f69baa9cdf8
clang::Sema::ActOnFunctionDeclarator(clang::Scope*, clang::Declarator&, clang:
:DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&,
llvm::MutableArrayRef<clang::TemplateParameterList*>, bool&) + 1244
0
6 libclangSema.so.3.7 0x00007f69baa9ec00
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&, llvm::Mutable
ArrayRef<clang::TemplateParameterList*>) + 1680
7 libclangSema.so.3.7 0x00007f69baa9f345
clang::Sema::ActOnDeclarator(clang::Scope*, clang::Declarator&) + 21
8 libclangParse.so.3.7 0x00007f69bb076924
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&
, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 100
9 libclangParse.so.3.7 0x00007f69bb085a91
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, clang::So
urceLocation*, clang::Parser::ForRangeInit*) + 1473
10 libclangParse.so.3.7 0x00007f69bb0f3cf1
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesW
ithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 273
11 libclangParse.so.3.7 0x00007f69bb0f43a9
12 libclangParse.so.3.7 0x00007f69bb0f43df
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 31
13 libclangParse.so.3.7 0x00007f69bb0f9523
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 259
14 libclangParse.so.3.7 0x00007f69bb0f9cd0
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) +
44815 libclangParse.so.3.7 0x00007f69bb06a550
clang::ParseAST(clang::Sema&, bool, bool) + 400
16 libclangFrontend.so.3.7 0x00007f69bed45586
clang::FrontendAction::Execute() + 118
17 libclangFrontend.so.3.7 0x00007f69bed1c9d1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 289
18 libclangFrontendTool.so.3.7 0x00007f69beab0853
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1939
19 clang-3.7 0x000000000040cb60 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1056
20 clang-3.7 0x000000000040a9d8 main + 9976
21 libc.so.6 0x00007f69be40476d __libc_start_main + 237
22 clang-3.7 0x000000000040af21
Stack dump:
0. Program arguments: /work/build-llvm-gitsvn/bin/clang-3.7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name bug.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 -coverage-file /work/<a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Conflicting types for '__builtin_isnan' on Android/ARM"
href="show_bug.cgi?id=20958">BUG20958</a>/bug.c -resource-dir
/work/build-llvm-gitsvn/bin/../lib/clang/3.7.0 -internal-isystem
/usr/local/include -internal-isystem
/work/build-llvm-gitsvn/bin/../lib/clang/3.7.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /work/<a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Conflicting types for '__builtin_isnan' on Android/ARM"
href="show_bug.cgi?id=20958">BUG20958</a> -ferror-limit 19 -fmessage-length 128
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics
-o bug.o -x c bug.c
1. bug.c:1:21: current parser token ';'
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (trunk 233677) (llvm/trunk 233674)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.7: 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.</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>