[LLVMbugs] [Bug 20370] New: clang hangs with -O

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 20 01:36:23 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20370

            Bug ID: 20370
           Summary: clang hangs with -O
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chocolate_police at outlook.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12795
  --> http://llvm.org/bugs/attachment.cgi?id=12795&action=edit
Clang will hang while this file with -O2

Compiling the attached .cpp file causes clang to hang when using -O2 and above
(at least 8 minutes on my machine). It could be related to bug 18898 since the
file contains switch statements, but this file is very small in comparison with
only 42 cases (vs. tens of thousands). I tried to reduce the code as much as I
could, but if I remove any more, the file compiles fine in no time at all.

> clang --version
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-unknown-linux-gnu
Thread model: posix

Command to cause the hang:
clang -Wall -c -O2 optimizerhang.cpp

-- 
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/20140720/2b96faaf/attachment.html>


More information about the llvm-bugs mailing list