internal compiler error: SSA corruption
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-10 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
gcc-snapshot (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Ubuntu version: 20.04.1 LTS
GCC version: gcc-10 (Ubuntu 10.2.0-
Minimal preprocessed source code to reproduce:
```c
a() {
int b;
__sigsetjmp();
for (;;) {
if (b)
b = c();
d();
}
}
```
Command to reproduce: `gcc-10 -O3 -c rofl.c` gives the following error:
```
rofl.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1 | a() {
| ^
rofl.c: In function ‘a’:
rofl.c:3:3: warning: implicit declaration of function ‘__sigsetjmp’ [-Wimplicit-
3 | __sigsetjmp();
| ^~~~~~~~~~~
rofl.c:6:11: warning: implicit declaration of function ‘c’ [-Wimplicit-
6 | b = c();
| ^
rofl.c:7:5: warning: implicit declaration of function ‘d’ [-Wimplicit-
7 | d();
| ^
Unable to coalesce ssa_names 2 and 4 which are marked as MUST COALESCE.
b_2(ab) and b_4(ab)
during RTL pass: expand
rofl.c:1:1: internal compiler error: SSA corruption
1 | a() {
| ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:/
```
I tried reproduce with a recent snapshot. Since gcc-snapshot in focal is actually older than gcc-10, I tried it under groovy instead. And indeed, I was able to reproduce in groovy's gcc-snapshot ( 11.0.0 20200917 (experimental) [master revision c12facd2288:
```c
a;
b() {
int c, d;
__sigsetjmp();
for (; a;)
for (; d;) {
if (c)
c = e();
f();
}
}
```
This file, when compiled with gcc-snapshot, leads to the following output:
```
rofl11.c:1:1: warning: data definition has no type or storage class
1 | a;
| ^
rofl11.c:1:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
rofl11.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int]
2 | b() {
| ^
rofl11.c: In function 'b':
rofl11.c:4:3: warning: implicit declaration of function '__sigsetjmp' [-Wimplicit-
4 | __sigsetjmp();
| ^~~~~~~~~~~
rofl11.c:8:13: warning: implicit declaration of function 'e' [-Wimplicit-
8 | c = e();
| ^
rofl11.c:9:7: warning: implicit declaration of function 'f' [-Wimplicit-
9 | f();
| ^
Unable to coalesce ssa_names 3 and 4 which are marked as MUST COALESCE.
c_3(ab) and c_4(ab)
during RTL pass: expand
rofl11.c:2:1: internal compiler error: SSA corruption
2 | b() {
| ^
0x185ffa7 internal_error(char const*, ...)
???:0
0xe92b7d coalesce_
???:0
0xe33007 rewrite_
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:/
```
confirmed, and fixed in focal. will be updated when we update gcc-10 in focal again.