<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 - clang -O0 compile crash of "Unsupported FPConstant size" CodeGen/GlobalISel/Utils.cpp:415"
   href="https://bugs.llvm.org/show_bug.cgi?id=51491">51491</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang -O0 compile crash of "Unsupported FPConstant size" CodeGen/GlobalISel/Utils.cpp:415
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>12.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>release blocker
          </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>yansendao@huawei.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25138" name="attach_25138" title="test-creduce.c">attachment 25138</a> <a href="attachment.cgi?id=25138&action=edit" title="test-creduce.c">[details]</a></span>
test-creduce.c

$ clang test-creduce.c
test-creduce.c:4:26: warning: remainder by zero is undefined
[-Wdivision-by-zero]
  b = 1409679256.0L / (0 % a + c);
                         ^ ~
Unsupported FPConstant size
UNREACHABLE executed at
/usr1/llvm-project/llvm/lib/CodeGen/GlobalISel/Utils.cpp:415!
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments:
/home/yansendao/software/boole/bisheng-compiler/bin/clang-12 -cc1 -triple
aarch64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -main-file-name test-creduce.c -mrelocation-model static -mllvm
-pass-remarks= -mllvm -pass-remarks-missed= -mllvm -pass-remarks-analysis=
-mframe-pointer=non-leaf -fmath-errno -ffp-contract=fast -fno-rounding-math
-mllvm -malt-pow-precision-low-opt-level -mconstructor-aliases -munwind-tables
-target-cpu generic -target-feature +neon -target-abi aapcs
-fallow-half-arguments-and-returns -fno-split-dwarf-inlining
-debugger-tuning=gdb -resource-dir
/home/yansendao/software/boole/bisheng-compiler/lib/clang/12.0.0
-internal-isystem /usr/local/include -internal-isystem
/home/yansendao/software/boole/bisheng-compiler/lib/clang/12.0.0/include
-internal-externc-isystem /usr/include/aarch64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /home/yansendao/history/issue/boole-issue2584
-ferror-limit 19 -fno-signed-char -fgnuc-version=4.2.1 -fcolor-diagnostics
-faddrsig -o /tmp/test-creduce-e00140.o -x c test-creduce.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'test-creduce.c'.
4.      Running pass 'AArch64PreLegalizerCombiner' on function '@main'
#0 0x0000aaaaac6e2370 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/yansendao/software/boole/bisheng-compiler/bin/clang-12+0x1c38370)
#1 0x0000aaaaac6e01d8 llvm::sys::RunSignalHandlers()
(/home/yansendao/software/boole/bisheng-compiler/bin/clang-12+0x1c361d8)
#2 0x0000aaaaac6e29b0 SignalHandler(int)
(/home/yansendao/software/boole/bisheng-compiler/bin/clang-12+0x1c389b0)
#3 0x0000fffff7ffc688 (linux-vdso.so.1+0x688)
#4 0x0000fffff7be44f8 raise
/build/glibc-D9JkfM/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
clang-12: error: unable to execute command: Aborted (core dumped)
clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)
Bisheng Compiler 2.0.0.b001 clang version 12.0.0 (clang-b411d5451023
flang-b411d5451023)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/yansendao/software/boole/bisheng-compiler/bin
clang-12: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/test-creduce-07f436.c
clang-12: note: diagnostic msg: /tmp/test-creduce-07f436.sh
clang-12: note: diagnostic msg: 

********************



$ cat test-creduce.c
const short a = 0;
int b, c;
int main() {
  b = 1409679256.0L / (0 % a + c);
  return 0;
}</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>