https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95290
Bug ID: 95290
Summary: ice in useless_type_conversion_p
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: ---
For this C++ code:
typedef short a;
enum b {};
typedef struct {
a c;
} d;
typedef struct {
a e, f;
} g;
typedef struct {
g h;
} i;
typedef struct {
d j;
int k;
} l;
class m {
i imgdata;
int n();
l o;
};
int m::n() try { imgdata.h.e = imgdata.h.f = o.j.c >> o.j.c; } catch (b) {
}
compiled by recent gcc trunk and compiler flag -O3, does this:
during GIMPLE pass: slp
bug614.cc: In member function ‘int m::n()’:
bug614.cc:21:5: internal compiler error: Segmentation fault
21 | int m::n() try { imgdata.h.e = imgdata.h.f = o.j.c >> o.j.c; } catch
(b)
{
| ^
0xf4c379 crash_signal(int)
../../trunk.git/gcc/toplev.c:328
0xbf179b useless_type_conversion_p(tree_node*, tree_node*)
../../trunk.git/gcc/gimple-expr.c:71
0x11d4ddd types_compatible_p(tree_node*, tree_node*)
../../trunk.git/gcc/gimple-expr.h:67
0x11d4ddd vect_maybe_update_slp_op_vectype(_slp_tree*, tree_node*)
../../trunk.git/gcc/tree-vect-stmts.c:11854
The problem first seems to occur sometime between dates
20200521 and 20200522.