[llvm-bugs] [Bug 50639] New: Compiler hang when declaring an array of structures
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 9 04:36:11 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50639
Bug ID: 50639
Summary: Compiler hang when declaring an array of structures
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: k.even-mendoza at imperial.ac.uk
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
Created attachment 24933
--> https://bugs.llvm.org/attachment.cgi?id=24933&action=edit
code that caused a compiler hang with -O0 and -O2
Hi,
I got a compiler hang when running:
```
clang -O2 -pedantic -w -Wextra test874084080-f2f58a.c
```
I attached the code after pre-processing (so all headers are in, but I can
supply the original code and the headers separately if needed).
I ran it for 12 hours with a pretty strong machine: Ubuntu-18,32GB, 64x, 4CPU.
It happens with clang-10, 11, 12 and 13.
GCC returns the errors in few seconds; this program is not supposed to pass
compilation, I hit this issue while using creduce for some testcases I got.
It seems to be related to this variable:
```
static struct S0 g_434[];
```
When replacing it to be
```
static struct S0 g_434;
```
and patching the use of it in the code, the problem disappeared.
--
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/20210609/f2a6909e/attachment.html>
More information about the llvm-bugs
mailing list