https://bugs.llvm.org/show_bug.cgi?id=43700
Bug ID: 43700
Summary: Label array with unused result results in clang crash
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: spiritual.dragon.of...@gmail.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
Created attachment 22685
--> https://bugs.llvm.org/attachment.cgi?id=22685&action=edit
Attached: Backtrace, preprocessed source and associated run script
Overview:
Declaring a label array with at least 3 labels while not assigning the result
to a variable, causes a segmentation fault to occur.
Attached is the resulting log of the command "clang -v
clang_empty_lbl_array.c".
Steps to reproduce:
Compile the code shown below (which should result in an empty main()) with the
command "clang clang_empty_lbl_array.c".
int main () {
(void * []) { &&L3, &&L2, &&L1 };
L1: ;
L2: ;
L3: ;
}
Actual Results:
clang crashes, resulting in no executable being generated.
Expected Results:
Generation of executable (with a warning) equivalent to:
int main () {
L1: ;
L2: ;
L3: ;
}
Build Date & Hardware:
Built 17/Oct/2019 on:
> clang --version
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs