tree-pretty-print.c (dump_generic_node): For -gimple properly dump negative integer...
authorRichard Biener <rguenther@suse.de>
Wed, 13 Mar 2019 10:56:32 +0000 (10:56 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 13 Mar 2019 10:56:32 +0000 (10:56 +0000)
2019-03-14  Richard Biener  <rguenther@suse.de>

* tree-pretty-print.c (dump_generic_node): For -gimple properly
dump negative integer constants using _Literal (type) -num.

From-SVN: r269645

gcc/ChangeLog
gcc/tree-pretty-print.c

index 310f8f8081f6e1fbd1362fbb202dae9264bf5607..73b62b2c91795c9188a587fb9428eae08869c26e 100644 (file)
@@ -1,3 +1,8 @@
+2019-03-14  Richard Biener  <rguenther@suse.de>
+
+       * tree-pretty-print.c (dump_generic_node): For -gimple properly
+       dump negative integer constants using _Literal (type) -num.
+
 2019-03-13  Jakub Jelinek  <jakub@redhat.com>
 
        * ipa-param-manipulation.h (struct ipa_parm_adjustment): Remove
index ccebfc23d255765b7b65127403150b78969abc9f..ae0a6c120723986dc3083f694f7560c436c0ecc5 100644 (file)
@@ -1830,7 +1830,8 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
          && (POINTER_TYPE_P (TREE_TYPE (node))
              || (TYPE_PRECISION (TREE_TYPE (node))
                  < TYPE_PRECISION (integer_type_node))
-             || exact_log2 (TYPE_PRECISION (TREE_TYPE (node))) == -1))
+             || exact_log2 (TYPE_PRECISION (TREE_TYPE (node))) == -1
+             || tree_int_cst_sgn (node) < 0))
        {
          pp_string (pp, "_Literal (");
          dump_generic_node (pp, TREE_TYPE (node), spc, flags, false);