[llvm-bugs] [Bug 51370] New: [12 Regression] clang front end crash
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Aug 5 18:26:31 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51370
Bug ID: 51370
Summary: [12 Regression] clang front end crash
Product: clang
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: anbu1024.me at gmail.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
$ cat 15.c
enum E
{
e1 = -"",
e2
} x;
void bar()
{
x = (x > 5) ? (5) : (x);
}
----------------------------------------------------------------
$ clang-1201 --version
clang version 12.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /path-to-llvm/12.0.1/install/bin
----------------------------------------------------------------
$ clang-1201 15.c
15.c:4:8: error: invalid argument type 'char *' to unary expression
e1 = -"",
^~~
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /path-to-llvm/12.0.1/install/bin/clang-12 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name 15.c
-mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic
-fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir
/path-to-llvm/12.0.1/install/lib/clang/12.0.1 -internal-isystem
/usr/local/include -internal-isystem
/path-to-llvm/12.0.1/install/lib/clang/12.0.1/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdebug-compilation-dir /path-to-code
-ferror-limit 19 -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -o
/tmp/15-a0c2cc.o -x c 15.c
1. 15.c:6:1: current parser token '}'
#0 0x00005621dfb92b01 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1ccbb01)
#1 0x00005621dfb908c4 llvm::sys::RunSignalHandlers()
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1cc98c4)
#2 0x00005621dfb90a3b SignalHandler(int)
(/path-to-llvm/12.0.1/install/bin/clang-12+0x1cc9a3b)
#3 0x00007f52d2de33c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#4 0x00005621de95e3d4 clang::ASTContext::getDeclAlign(clang::Decl const*, bool)
const (.cold) (/path-to-llvm/12.0.1/install/bin/clang-12+0xa973d4)
clang-12: error: unable to execute command: Segmentation fault (core dumped)
clang-12: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 12.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /path-to-llvm/12.0.1/install/bin
clang-12: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/15-ca1a89.c
clang-12: note: diagnostic msg: /tmp/15-ca1a89.sh
clang-12: note: diagnostic msg:
********************
----------------------------------------------------------------
$ clang-1100 --version
clang version 11.0.0 (https://github.com/llvm/llvm-project.git
0160ad802e899c2922bc9b29564080c22eb0908c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/path-to-llvm/11.0.0/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin
----------------------------------------------------------------
$ clang-1100 15.c
15.c:4:8: error: invalid argument type 'char *' to unary expression
e1 = -"",
^~~
1 error generated.
--
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/20210806/a8f403f0/attachment.html>
More information about the llvm-bugs
mailing list