[llvm-bugs] [Bug 43700] New: Label array with unused result results in clang crash
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 17 05:46:26 PDT 2019
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: unassignedclangbugs at nondot.org
Reporter: spiritual.dragon.of.ra at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191017/8d325693/attachment.html>
More information about the llvm-bugs
mailing list