<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 trunk segfault when compiling sdl2_gfx" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23999&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=IXvZR6wqXSfqMX_ZHL1tfqKypbjVRrBvd9dobSzxFhw&s=wCSLB_tHHCI_28tqR8Q8AgK-hIQcCj62hJ6GigI7Ens&e=">23999</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang trunk segfault when compiling sdl2_gfx
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>amdmi3@amdmi3.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On FreeBSD 11, while compiling sdl2_gfx package
(<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ferzkopp.net_Software_SDL-5Fgfx-2D2.0_&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=IXvZR6wqXSfqMX_ZHL1tfqKypbjVRrBvd9dobSzxFhw&s=0pqXwBXCRrW2NiQOmEEZfyml8SOe8hJLlHmaH2ZfQ2M&e=">http://www.ferzkopp.net/Software/SDL_gfx-2.0/</a>) with MMX support enabled
(CFLAGS=-DMMX):

---
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (trunk)
Target: x86_64-portbld-freebsd11.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_bugs_&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=IXvZR6wqXSfqMX_ZHL1tfqKypbjVRrBvd9dobSzxFhw&s=oW1R73Kv4rpJaCPX_aay5mTmV1xvyNr1cCApSdt5UqE&e=">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
libtool: compile:  clang-devel -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DLT_OBJDIR=\".libs/\" -DPACKAGE=\"SDL2_gfx\" -DVERSION=\"1.0.1\"
-DSIZEOF_LONG=8 -I. -O2 -pipe -DUSE_MMX -fstack-protector -fno-strict-aliasing
-O -DUSE_MMX -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT
-D_THREAD_SAFE -MT SDL2_gfxPrimitives.lo -MD -MP -MF
.deps/SDL2_gfxPrimitives.Tpo -c SDL2_gfxPrimitives.c -o SDL2_gfxPrimitives.o
<span class="quote">>/dev/null 2>&1</span >
clang: note: diagnostic msg: 
********************

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

********************
Makefile:426: recipe for target 'SDL2_imageFilter.lo' failed
---

Happens both with system clang 3.6.1:

FreeBSD clang version 3.6.1 (tags/RELEASE_361/final 237755) 20150525
Target: x86_64-unknown-freebsd11.0
Thread model: posix

and clang 3.7 (r236894) from ports:

clang version 3.7.0 (trunk)
Target: x86_64-portbld-freebsd11.0
Thread model: posix

Mentioned files attached.

For the note, the problem does not show itself if -march=nocona is added to
compiler flags.</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>