<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - assertion triggers while trying to build the userspace part of FreeBSD on sparc64"
   href="https://bugs.llvm.org/show_bug.cgi?id=35344">35344</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>assertion triggers while trying to build the userspace part of FreeBSD on sparc64
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>5.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Sun
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mala@hinterbergen.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19442" name="attach_19442" title="archive with prepocessed source and run script">attachment 19442</a> <a href="attachment.cgi?id=19442&action=edit" title="archive with prepocessed source and run script">[details]</a></span>
archive with prepocessed source and run script

While FreeBSD doesn't officially support building with clang on sparc64, I
thought I'd give it a try to see how much works, and how much doesn't.
Unfortunately, an assertion in the compiler itself triggers (see below). I've
attached the preprocessed source and the run script. Please let me know if you
need more information.

/usr/local/bin/clang50 -fPIC -DPIC -g -O2 -fno-strict-aliasing -pipe
-fno-integrated-as -Wno-comment -I/usr/src/lib/msun/ld128
-I/usr/src/lib/msun/sparc64 -I/usr/src/lib/msun/src -I/usr/src/lib/li
bc/include  -I/usr/src/lib/libc/sparc64 -mcpu=ultrasparc3  -MD 
-MF.depend.catrigl.pico -MTcatrigl.pico -std=gnu99 -fstack-protector-strong
-Wsystem-headers -Wno-pointer-sign -Wno-unknown-pragmas
-Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
-Wno-unused-function -Wno-enum-conversion -Wno-unused-local-ty
pedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum
-Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-arguments
-fno-dwarf2-cfi-asm  -c /usr/src/lib/msun/src/catrigl.c -o catrigl
.pico
Assertion failed: (FragmentOffset >= OffsetInBits && "overlapping or duplicate
fragments"), function addFragmentOffset, file
/usr/ports/devel/llvm50/work/llvm-5.0.0.src/lib/CodeGen/AsmPrinter/Dwar
fExpression.cpp, line 405.
Stack dump:
0.      Program arguments: /usr/local/llvm50/bin/clang-5.0 -cc1 -triple
sparc64-portbld-freebsd11.1 -S -disable-free -main-file-name catrigl.c
-mrelocation-model pic -pic-level 2 -mthread-model po
six -mdisable-fp-elim -relaxed-aliasing -no-integrated-as -mconstructor-aliases
-target-cpu ultrasparc3 -mfloat-abi hard -dwarf-column-info
-debug-info-kind=standalone -dwarf-version=2 -debugger-t
uning=gdb -coverage-notes-file /usr/obj/usr/src/lib/msun/catrigl.gcno
-resource-dir /usr/local/llvm50/lib/clang/5.0.0 -dependency-file
.depend.catrigl.pico -sys-header-deps -MT catrigl.pico -D PIC
 -I /usr/src/lib/msun/ld128 -I /usr/src/lib/msun/sparc64 -I
/usr/src/lib/msun/src -I /usr/src/lib/libc/include -I /usr/src/lib/libc/sparc64
-O2 -Wno-comment -Wsystem-headers -Wno-pointer-sign -Wno
-unknown-pragmas -Wno-empty-body -Wno-string-plus-int
-Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value
-Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wn
o-unused-local-typedef -Wno-address-of-packed-member -Wno-switch
-Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -std=gnu99
-fno-dwarf-directory-asm -fdebug-compilation-dir /usr/obj/
usr/src/lib/msun -ferror-limit 19 -fmessage-length 196 -stack-protector 2
-fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics
-vectorize-loops -vectorize-slp -o /tmp/catrigl-b7157
b.s -x c /usr/src/lib/msun/src/catrigl.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'/usr/src/lib/msun/src/catrigl.c'.
4.      Running pass 'Sparc Assembly Printer' on function '@casinhl'
clang-5.0: error: unable to execute command: Abort trap (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.0 (tags/RELEASE_500/final)
Target: sparc64-portbld-freebsd11.1
Thread model: posix
InstalledDir: /usr/local/llvm50/bin
clang-5.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-5.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-5.0: note: diagnostic msg: /tmp/catrigl-7460e7.c
clang-5.0: note: diagnostic msg: /tmp/catrigl-7460e7.sh
clang-5.0: note: diagnostic msg:

********************
*** Error code 254

Stop.</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>