aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 163d495b2b0..7c1ea5d5cb9 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see
#include "pretty-print.h"
#include "params.h"
#include "dumpfile.h"
+#include "builtins.h"
/* Functions and data structures for expanding case statements. */
@@ -774,24 +775,20 @@ static void
dump_case_nodes (FILE *f, struct case_node *root,
int indent_step, int indent_level)
{
- HOST_WIDE_INT low, high;
-
if (root == 0)
return;
indent_level++;
dump_case_nodes (f, root->left, indent_step, indent_level);
- low = tree_to_shwi (root->low);
- high = tree_to_shwi (root->high);
-
fputs (";; ", f);
- if (high == low)
- fprintf (f, "%*s" HOST_WIDE_INT_PRINT_DEC,
- indent_step * indent_level, "", low);
- else
- fprintf (f, "%*s" HOST_WIDE_INT_PRINT_DEC " ... " HOST_WIDE_INT_PRINT_DEC,
- indent_step * indent_level, "", low, high);
+ fprintf (f, "%*s", indent_step * indent_level, "");
+ print_dec (root->low, f, TYPE_SIGN (TREE_TYPE (root->low)));
+ if (!tree_int_cst_equal (root->low, root->high))
+ {
+ fprintf (f, " ... ");
+ print_dec (root->high, f, TYPE_SIGN (TREE_TYPE (root->high)));
+ }
fputs ("\n", f);
dump_case_nodes (f, root->right, indent_step, indent_level);