[llvm-bugs] [Bug 52483] New: ICE when compiling with -g3 at -O0

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 11 18:35:24 PST 2021


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

            Bug ID: 52483
           Summary: ICE when compiling with -g3 at -O0
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: tlwang at uwaterloo.ca
                CC: cnsun at uwaterloo.ca, craig.topper at gmail.com,
                    llvm-bugs at lists.llvm.org, llvm-dev at redking.me.uk,
                    pengfei.wang at intel.com, spatel+llvm at rotateright.com

The following program compiles at -O0 without -g3, but ICE's when you add the
-g3 flag.

$ clang-trunk -v
clang version 14.0.0 (https://github.com/llvm/llvm-project.git
3330a6670ee8d725f16c61fa127ba93613f1fc1f)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ cat line_program-234c9c.c
a() {
  for (;; 1)
# 0
  {
  }
}
main() {}
$
$ clang-trunk -w -O0 -g3 line_program-234c9c.c
cannot have column info without line info
!15 = distinct !DILexicalBlock(scope: !16, file: !1, column: 3)
cannot have column info without line info
!15 = distinct !DILexicalBlock(scope: !16, file: !1, column: 3)
fatal error: error in backend: Broken module found, compilation aborted!
clang-14: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 14.0.0 (https://github.com/llvm/llvm-project.git
3330a6670ee8d725f16c61fa127ba93613f1fc1f)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
clang-14: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-14: note: diagnostic msg: /tmp/line_program-234c9c-56d2f2.c
clang-14: note: diagnostic msg: /tmp/line_program-234c9c-56d2f2.sh
clang-14: note: diagnostic msg:

********************
$
$ clang-trunk -w -O0 line_program-234c9c.c
$

-- 
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/20211112/0e11f268/attachment-0001.html>


More information about the llvm-bugs mailing list