/* Print RTL for GCC.
- Copyright (C) 1987-2018 Free Software Foundation, Inc.
+ Copyright (C) 1987-2020 Free Software Foundation, Inc.
This file is part of GCC.
#include "print-rtl.h"
#include "rtl-iter.h"
+/* Disable warnings about quoting issues in the pp_xxx calls below
+ that (intentionally) don't follow GCC diagnostic conventions. */
+#if __GNUC__ >= 10
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-diag"
+#endif
+
/* String printed at beginning of each RTL when it is dumped.
This string is set to ASM_COMMENT_START when the RTL is dumped in
the assembly output file. */
m_sawclose = 1;
for (int j = 0; j < XVECLEN (in_rtx, idx); j++)
- print_rtx (XVECEXP (in_rtx, idx, j));
+ {
+ int j1;
+
+ print_rtx (XVECEXP (in_rtx, idx, j));
+ for (j1 = j + 1; j1 < XVECLEN (in_rtx, idx); j1++)
+ if (XVECEXP (in_rtx, idx, j) != XVECEXP (in_rtx, idx, j1))
+ break;
+
+ if (j1 != j + 1)
+ {
+ fprintf (m_outfile, " repeated x%i", j1 - j);
+ j = j1 - 1;
+ }
+ }
m_indent -= 2;
}
pp_string (pp, tmp);
break;
case CONST_STRING:
- pp_printf (pp, "\"%s\"", XSTR (x, 0));
+ pp_string (pp, "\"");
+ pretty_print_string (pp, XSTR (x, 0), strlen (XSTR (x, 0)));
+ pp_string (pp, "\"");
break;
case SYMBOL_REF:
pp_printf (pp, "`%s'", XSTR (x, 0));
print_exp (pp, x, verbose);
break;
case CLOBBER:
- case CLOBBER_HIGH:
case USE:
pp_printf (pp, "%s ", GET_RTX_NAME (GET_CODE (x)));
print_value (pp, XEXP (x, 0), verbose);
gcc_assert (strlen (print_rtx_head) < sizeof (indented_print_rtx_head) - 4);
snprintf (indented_print_rtx_head,
sizeof (indented_print_rtx_head),
- "%s ", print_rtx_head);
+ "%s ", print_rtx_head);
print_rtx_head = indented_print_rtx_head;
for (int i = 0; i < seq->len (); i++)
print_insn_with_notes (pp, seq->insn (i));
}
#endif
+
+#if __GNUC__ >= 10
+# pragma GCC diagnostic pop
+#endif