[llvm-bugs] [Bug 24605] New: clang crashes at -O1 and above on x86_64-linux-gnu

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 27 16:03:31 PDT 2015


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

            Bug ID: 24605
           Summary: clang crashes at -O1 and above on x86_64-linux-gnu
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: su at cs.ucdavis.edu
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The current clang trunk crashes when compiling the following test case on
x86_64-linux-gnu at -O1 and above in both 32-bit and 64-bit modes.

This is a regression from 3.6.x.


$ clang-trunk -v
clang version 3.8.0 (trunk 246189)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/tools/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.9.2
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.1.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
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.2
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/5.1.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$ 
$ clang-trunk -O0 -c small.c
small.c:8:14: warning: unsequenced modification and access to 'a'
[-Wunsequenced]
  b = a > (a -= 1); 
      ~      ^
1 warning generated.
$ 
$ clang-3.6 -O1 -c small.c
small.c:8:14: warning: unsequenced modification and access to 'a'
[-Wunsequenced]
  b = a > (a -= 1); 
      ~      ^
1 warning generated.
$ 
$ clang-trunk -O1 -c small.c
small.c:8:14: warning: unsequenced modification and access to 'a'
[-Wunsequenced]
  b = a > (a -= 1); 
      ~      ^
Instruction does not dominate all uses!
  %sub = add i8 %or, -1
  store i8 %sub, i8* @a, align 1, !tbaa !1
fatal error: error in backend: Broken function found, compilation aborted!
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 3.8.0 (trunk 246189)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/tools/bin
clang: 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: note: diagnostic msg: 
********************

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

********************
$ 


-------------------------


char a;
int b;

void
fn1 ()
{
  a |= 139;
  b = a > (a -= 1); 
}

-- 
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/20150827/2156612e/attachment.html>


More information about the llvm-bugs mailing list