https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119344

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I guess we need

--- a/gcc/tree.cc
+++ b/gcc/tree.cc
@@ -4101,7 +4101,7 @@ skip_simple_arithmetic (tree expr)
      computations if they actually occur.  */
   while (true)
     {
-      if (UNARY_CLASS_P (expr))
+      if (UNARY_CLASS_P (expr) && TREE_OPERAND (expr, 0))
    expr = TREE_OPERAND (expr, 0);
       else if (BINARY_CLASS_P (expr))
    {

Reply via email to