[llvm-bugs] [Bug 25532] New: clang crashes when compiling C11

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 14 15:38:32 PST 2015


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

            Bug ID: 25532
           Summary: clang crashes when compiling C11
           Product: clang
           Version: trunk
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tony at git-pull.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15290
  --> https://llvm.org/bugs/attachment.cgi?id=15290&action=edit
Run script

When using clang_complete on vim (https://github.com/Rip-Rip/clang_complete),
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
http://llvm.org/bugs/ 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

-- 
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/20151114/4136ff72/attachment.html>


More information about the llvm-bugs mailing list