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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to