https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114888
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[14 Regression] ICE when |[14/15 Regression] ICE when
|cross compiling binutils |cross compiling binutils
Keywords| |ice-checking,
| |ice-on-valid-code
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Seems we're missing a dependence check in the sizeof / sizeof code:
diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc
index e5a52dc2b39..284f6e29e36 100644
--- a/gcc/cp/typeck.cc
+++ b/gcc/cp/typeck.cc
@@ -5500,7 +5500,7 @@ cp_build_binary_op (const op_location_t &location,
type0 = TREE_TYPE (type0);
if (!TYPE_P (type1))
type1 = TREE_TYPE (type1);
- if (type0
+ if (type0 && type1
&& INDIRECT_TYPE_P (type0)
&& same_type_p (TREE_TYPE (type0), type1))
{