https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110777
Bug ID: 110777
Summary: ice: SSA corruption
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
This C code
int *findOrAddBackgroundInPalette_palette_pnm;
static void findOrAddBackgroundInPalette(unsigned *paletteSizeP,
int *backgroundIndexP) {
if (*paletteSizeP) {
*backgroundIndexP = (*paletteSizeP)++;
pm_message();
}
pm_message(findOrAddBackgroundInPalette_palette_pnm[*backgroundIndexP]);
}
void computeColorMap(int *backgroundIndexP) {
unsigned paletteSize;
findOrAddBackgroundInPalette(&paletteSize, backgroundIndexP);
}
int main() {
unsigned backgroundIndex;
_setjmp();
computeColorMap(&backgroundIndex);
}
with recent gcc trunk, does this:
$ ~/gcc/results/bin/gcc -c -O3 -w ~/cvise/bug944.c
Unable to coalesce ssa_names 27 and 31 which are marked as MUST COALESCE.
paletteSize_27(ab) and paletteSize_31(ab)
during RTL pass: expand
/home/dcb38/cvise/bug944.c: In function ‘main’:
/home/dcb38/cvise/bug944.c:14:5: internal compiler error: SSA corruption
14 | int main() {
| ^~~~
0xf95b19 fail_abnormal_edge_coalesce(int, int)
../../trunk.year/gcc/tree-ssa-coalesce.cc:1003
0xf95b19 coalesce_partitions(_var_map*, ssa_conflicts*, coalesce_list*,
_IO_FILE*)
../../trunk.year/gcc/tree-ssa-coalesce.cc:1425
The bug first seems to occur sometime between g:b2cfe5233e682fc0
and g:f32518726ee8e836, a range of 30 commits.