[llvm-bugs] [Bug 42076] New: Compiler assert on Risc-V code

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 30 13:59:20 PDT 2019


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

            Bug ID: 42076
           Summary: Compiler assert on Risc-V code
           Product: clang
           Version: 8.0
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: grogers at micron.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 22054
  --> https://bugs.llvm.org/attachment.cgi?id=22054&action=edit
C source file

risc-v clang assert on the following code:

float foobar(float x1, float x2, float x3)
{
    //return (x1+x2)/x3;
    return x1+x2;
}

Here is the trace back:
mfed04: grogers: r5float $ ~/scratch/llvm-project/riscv-build/bin/clang -c
float.c 
Stack dump:
0.      Program arguments: /work/grogers/llvm-project/riscv-build/bin/clang-8
-cc1 -triple riscv64-unknown-unknown-elf -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name float.c
-mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -nostdsysteminc -fuse-init-array
-target-abi lp64 -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/nethome/grogers/scratch/tmp/r5float/float.gcno -resource-dir
/work/grogers/llvm-project/riscv-build/lib/clang/8.0.0 -isysroot
/nethome/grogers/scratch/llvm-project/riscv-build -internal-isystem
/nethome/grogers/scratch/llvm-project/riscv-build/include
-fdebug-compilation-dir /nethome/grogers/scratch/tmp/r5float -ferror-limit 19
-fmessage-length 80 -fno-signed-char -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -o float.o -x c float.c -faddrsig 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'float.c'.
4.      Running pass 'RISCV DAG->DAG Pattern Instruction Selection' on function
'@foobar'
#0 0x00007f258470903a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/nethome/grogers/scratch/llvm-project/llvm/lib/Support/Unix/Signals.inc:499:0
#1 0x00007f2584706fd4 llvm::sys::RunSignalHandlers()
/nethome/grogers/scratch/llvm-project/llvm/lib/Support/Signals.cpp:69:0
#2 0x00007f2584707112 SignalHandler(int)
/nethome/grogers/scratch/llvm-project/llvm/lib/Support/Unix/Signals.inc:358:0
#3 0x00007f2581f34f20 (/lib/x86_64-linux-gnu/libc.so.6+0x3ef20)
#4 0x00007f258148f2da _ZN4llvm13TrackingMDRefC4ERKS0_
/nethome/grogers/scratch/llvm-project/llvm/include/llvm/IR/TrackingMDRef.h:34:0
#5 0x00007f258148f2da _ZN4llvm18TypedTrackingMDRefINS_6MDNodeEEC4ERKS2_
/nethome/grogers/scratch/llvm-project/llvm/include/llvm/IR/TrackingMDRef.h:115:0
#6 0x00007f258148f2da _ZN4llvm8DebugLocC4ERKS0_
/nethome/grogers/scratch/llvm-project/llvm/include/llvm/IR/DebugLoc.h:34:0
#7 0x00007f258148f2da _ZN4llvm5SDLocC4EPKNS_6SDNodeE
/nethome/grogers/scratch/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1087:0
#8 0x00007f258148f2da
llvm::DAGTypeLegalizer::ExpandIntRes_FP_TO_SINT(llvm::SDNode*, llvm::SDValue&,
llvm::SDValue&)
/nethome/grogers/scratch/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2336:0
#9 0x000055cd18acf910 
clang-8: error: unable to execute command: Segmentation fault (core dumped)
clang-8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 
Target: riscv64-unknown-unknown-elf
Thread model: posix
InstalledDir: /nethome/grogers/scratch/llvm-project/riscv-build/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-8: note: diagnostic msg:

-- 
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/20190530/2b7a5d8d/attachment.html>


More information about the llvm-bugs mailing list