<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 - clang6 segfaults with -mcpu=power9"
   href="https://bugs.llvm.org/show_bug.cgi?id=37330">37330</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang6 segfaults with -mcpu=power9
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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>kennethsalerno@yahoo.com
          </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=20259" name="attach_20259" title="source file to reproduce error">attachment 20259</a> <a href="attachment.cgi?id=20259&action=edit" title="source file to reproduce error">[details]</a></span>
source file to reproduce error

The same compilation without "-mcpu=power9" succeeds.

# Crash reproducer for clang version 6.0.0 (tags/RELEASE_600/final)
# Driver args:
        "-B" "/usr/local/bin/powerpc64-unknown-freebsd11.1-" \
        "--target=powerpc64-unknown-freebsd11.1" \
        "--sysroot=/usr/obj/powerpc.powerpc64/usr/src/tmp" \
        "-B" "/usr/obj/powerpc.powerpc64/usr/src/tmp/usr/bin" \
        "-O2" \
        "-fomit-frame-pointer" \
        "-pipe" \
        "-fno-stack-protector" \
        "-D" "_FORTIFY_SOURCE=0" \
        "-fno-asynchronous-unwind-tables" \
        "-mcpu=power9" \
        "-mtune=power9" \
        "-m32" \
        "-I" "." \
        "-I" "/usr/src/sys/boot/libstand32/../../../lib/libstand" \
        "-D" "BZ_NO_STDIO" \
        "-D" "BZ_NO_COMPRESS" \
        "-D" "HAVE_MEMCPY" \
        "-I"
"/usr/src/sys/boot/libstand32/../../../lib/libstand/../../contrib/zlib" \
        "-ffreestanding" \
        "-Wformat" \
        "-msoft-float" \
        "-D" "_STANDALONE" \
        "-MD" \
        "-MF" ".depend.adler32.o" \
        "-MT" "adler32.o" \
        "-std=gnu99" \
        "-Wno-pointer-sign" \
        "-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-typedef" \
        "-Wno-address-of-packed-member" \
        "-Wno-switch" \
        "-Wno-switch-enum" \
        "-Wno-knr-promoted-parameter" \
        "-Wno-parentheses" \
        "-Qunused-arguments" \
        "-c" \
       
"/usr/src/sys/boot/libstand32/../../../lib/libstand/../../contrib/zlib/adler32.c"
\
        "-o" "adler32.o"

# Original command:
"/usr/local/llvm60/bin/clang-6.0" \
        "-cc1" \
        "-triple" "powerpc-unknown-freebsd11.1" \
        "-emit-obj" \
        "-disable-free" \
        "-main-file-name" "adler32.c" \
        "-mrelocation-model" "static" \
        "-mthread-model" "posix" \
        "-masm-verbose" \
        "-mconstructor-aliases" \
        "-ffreestanding" \
        "-target-cpu" "pwr9" \
        "-target-feature" \
        "-hard-float" \
        "-msoft-float" \
        "-mfloat-abi" "soft" \
        "-dwarf-column-info" \
        "-debugger-tuning=gdb" \
        "-coverage-notes-file"
"/usr/obj/powerpc.powerpc64/usr/src/sys/boot/libstand32/adler32.gcno" \
        "-resource-dir" "/usr/local/llvm60/lib/clang/6.0.0" \
        "-dependency-file" ".depend.adler32.o" \
        "-sys-header-deps" \
        "-MT" "adler32.o" \
        "-D" "_FORTIFY_SOURCE=0" \
        "-I" "." \
        "-I" "/usr/src/sys/boot/libstand32/../../../lib/libstand" \
        "-D" "BZ_NO_STDIO" \
        "-D" "BZ_NO_COMPRESS" \
        "-D" "HAVE_MEMCPY" \
        "-I"
"/usr/src/sys/boot/libstand32/../../../lib/libstand/../../contrib/zlib" \
        "-D" "_STANDALONE" \
        "-isysroot" "/usr/obj/powerpc.powerpc64/usr/src/tmp" \
        "-O2" \
        "-Wformat" \
        "-Wno-pointer-sign" \
        "-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-typedef" \
        "-Wno-address-of-packed-member" \
        "-Wno-switch" \
        "-Wno-switch-enum" \
        "-Wno-knr-promoted-parameter" \
        "-Wno-parentheses" \
        "-std=gnu99" \
        "-fdebug-compilation-dir" \
        "/usr/obj/powerpc.powerpc64/usr/src/sys/boot/libstand32" \
        "-ferror-limit" "19" \
        "-fmessage-length" "0" \
        "-fno-signed-char" \
        "-fobjc-runtime=gnustep" \
        "-fdiagnostics-show-option" \
        "-vectorize-loops" \
        "-vectorize-slp" \
        "-o" "adler32.o" \
        "-x" "c" \
       
"/usr/src/sys/boot/libstand32/../../../lib/libstand/../../contrib/zlib/adler32.c"
\

"/usr/local/llvm60/bin/clang-6.0" \
        "-cc1" \
        "-triple" "powerpc-unknown-freebsd11.1" \
        "-emit-obj" \
        "-disable-free" \
        "-main-file-name" "adler32.c" \
        "-mrelocation-model" "static" \
        "-mthread-model" "posix" \
        "-masm-verbose" \
        "-mconstructor-aliases" \
        "-ffreestanding" \
        "-target-cpu" "pwr9" \
        "-target-feature" \
        "-hard-float" \
        "-msoft-float" \
        "-mfloat-abi" "soft" \
        "-dwarf-column-info" \
        "-debugger-tuning=gdb" \
        "-coverage-notes-file"
"/usr/obj/powerpc.powerpc64/usr/src/sys/boot/libstand32/adler32.gcno" \
        "-sys-header-deps" \
        "-D" "_FORTIFY_SOURCE=0" \
        "-D" "BZ_NO_STDIO" \
        "-D" "BZ_NO_COMPRESS" \
        "-D" "HAVE_MEMCPY" \
        "-D" "_STANDALONE" \
        "-O2" \
        "-Wformat" \
        "-Wno-pointer-sign" \
        "-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-typedef" \
        "-Wno-address-of-packed-member" \
        "-Wno-switch" \
        "-Wno-switch-enum" \
        "-Wno-knr-promoted-parameter" \
        "-Wno-parentheses" \
        "-std=gnu99" \
        "-ferror-limit" "19" \
        "-fmessage-length" "0" \
        "-fno-signed-char" \
        "-fobjc-runtime=gnustep" \
        "-fdiagnostics-show-option" \
        "-vectorize-loops" \
        "-vectorize-slp" \
        "-x" "c" \
        "adler32-be93c8.c" \</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>