[llvm-bugs] [Bug 26973] New: crash on valid code at -O1 and above in 64-bit mode on x86_64-linux-gnu (error in backend: Broken function found)

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 17 03:11:51 PDT 2016


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

            Bug ID: 26973
           Summary: crash on valid code at -O1 and above in 64-bit mode on
                    x86_64-linux-gnu (error in backend: Broken function
                    found)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chengniansun at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following code crashes clang trunk at -O1 and above in 64-bit mode on
x86_64-linux-gnu.  


$: clang-trunk -v
clang version 3.9.0 (trunk 263641)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$: 
$: clang-trunk -w -c small.c -O1
Instruction does not dominate all uses!
  %dec3 = add nsw i32 %p1.addr.0, -1
  %3 = sext i32 %dec3 to i64
fatal error: error in backend: Broken function found, compilation aborted!
clang-3.9: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 3.9.0 (trunk 263641)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.9: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.9: note: diagnostic msg: /home/cnsun/ramdisk/tmp/small-04eb97.c
clang-3.9: note: diagnostic msg: /home/cnsun/ramdisk/tmp/small-04eb97.sh
clang-3.9: note: diagnostic msg: 

********************
$: 
$: clang-trunk -w -c small.c -O0
$: 
$: cat small.c
int a;
double b;
double *c;
void fn1(p1) {
  for (;; p1--) {
    a = p1;
    for (; p1 >= a; a--)
      b = c[p1];
  }
}
$:

-- 
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/20160317/f752beb1/attachment.html>


More information about the llvm-bugs mailing list