<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 --- - clang crashes when compiling C11"
href="https://llvm.org/bugs/show_bug.cgi?id=25532">25532</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang crashes when compiling C11
</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>FreeBSD
</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>tony@git-pull.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>Created <span class=""><a href="attachment.cgi?id=15290" name="attach_15290" title="Run script">attachment 15290</a> <a href="attachment.cgi?id=15290&action=edit" title="Run script">[details]</a></span>
Run script
When using clang_complete on vim (<a href="https://github.com/Rip-Rip/clang_complete">https://github.com/Rip-Rip/clang_complete</a>),
this also causes VIM to crash.
This happens in FreeBSD's clang 3.7 (246257) as well.
This output is from:
$ clang-devel --version
clang version 3.8.0
Target: x86_64-unknown-freebsd11.0
Thread model: posix
InstalledDir: /usr/local/llvm-devel/bin
Attached: runscript. Source file is coming.
Console output:
-- Configuring done
[3/1859]
-- Generating done
-- Build files have been written to:
/usr/home/tony/work/c++/sdl2-boilerplate/build
[ 50%] Building C object CMakeFiles/aerobiz.dir/src/main.c.o
/usr/home/tony/work/c++/sdl2-boilerplate/src/main.c:182:22: error: member
reference type 'SDL_Point *' (aka 'struct SDL_Point *') is a pointer; did you
mean
to use '->'?
if (abs(&velocity.x + x) <= MAX_HERO_MOVEMENT) {
~~~~~~~~^
->
/usr/home/tony/work/c++/sdl2-boilerplate/src/main.c:182:13: warning:
incompatible pointer to integer conversion passing 'int *' to parameter of type
'int';
dereference with * [-Wint-conversion]
if (abs(&velocity.x + x) <= MAX_HERO_MOVEMENT) {
^~~~~~~~~~~~~~~
*( )
/usr/include/stdlib.h:83:13: note: passing argument to parameter here
int abs(int) __pure2;
^
Type not integer, floating, or complex
UNREACHABLE executed at
/wrkdirs/usr/ports/devel/llvm-devel/work/llvm-828759786da156e0a2a34f9ded54c6d976cf3087/tools/clang/lib/Sema/SemaChecking.cpp:4816!
clang-3.8: error: unable to execute command: Abort trap (core dumped)
clang-3.8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.8.0
Target: x86_64-unknown-freebsd11.0
Thread model: posix
InstalledDir: /usr/local/llvm-devel/bin
clang-3.8: 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-3.8: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.8: note: diagnostic msg: /tmp/main-18a3cc.c
clang-3.8: note: diagnostic msg: /tmp/main-18a3cc.sh
clang-3.8: note: diagnostic msg:
********************
*** Error code 254
Stop.
make[2]: stopped in /usr/home/tony/work/c++/sdl2-boilerplate/build
*** Error code 1
Stop.
make[1]: stopped in /usr/home/tony/work/c++/sdl2-boilerplate/build
*** Error code 1
Stop.
make: stopped in /usr/home/tony/work/c++/sdl2-boilerplate/build</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>