This commit is contained in:
Jakub Jelinek 2011-10-03 20:31:55 +02:00
parent 17a81bfa0e
commit 37a4ebf944
2 changed files with 37 additions and 0 deletions

View File

@ -169,6 +169,7 @@ Patch15: gcc46-libstdc++-docs.patch
Patch17: gcc46-no-add-needed.patch
Patch18: gcc46-ppl-0.10.patch
Patch19: gcc46-pr47858.patch
Patch20: gcc46-godump.patch
Patch1000: fastjar-0.97-segfault.patch
Patch1001: fastjar-0.97-len1.patch
@ -640,6 +641,7 @@ package or when debugging this package.
%patch18 -p0 -b .ppl-0.10~
%endif
%patch19 -p0 -b .pr47858~
%patch20 -p0 -b .godump~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF

35
gcc46-godump.patch Normal file
View File

@ -0,0 +1,35 @@
2011-10-03 Jakub Jelinek <jakub@redhat.com>
Ian Lance Taylor <iant@google.com>
* godump.c (go_output_typedef): Handle printing also
enum values that don't fit into signed HWI.
--- gcc/godump.c.jj 2011-03-15 15:31:35.000000000 +0100
+++ gcc/godump.c 2011-10-03 20:27:50.762422071 +0200
@@ -844,9 +844,23 @@ go_output_typedef (struct godump_contain
for (element = TYPE_VALUES (TREE_TYPE (decl));
element != NULL_TREE;
element = TREE_CHAIN (element))
- fprintf (go_dump_file, "const _%s = " HOST_WIDE_INT_PRINT_DEC "\n",
- IDENTIFIER_POINTER (TREE_PURPOSE (element)),
- tree_low_cst (TREE_VALUE (element), 0));
+ if (host_integerp (TREE_VALUE (element), 0))
+ fprintf (go_dump_file, "const _%s = " HOST_WIDE_INT_PRINT_DEC "\n",
+ IDENTIFIER_POINTER (TREE_PURPOSE (element)),
+ tree_low_cst (TREE_VALUE (element), 0));
+ else if (host_integerp (TREE_VALUE (element), 1))
+ fprintf (go_dump_file,
+ "const _%s = " HOST_WIDE_INT_PRINT_UNSIGNED "\n",
+ IDENTIFIER_POINTER (TREE_PURPOSE (element)),
+ tree_low_cst (TREE_VALUE (element), 1));
+ else
+ fprintf (go_dump_file,
+ "const _%s = " HOST_WIDE_INT_PRINT_DOUBLE_HEX "\n",
+ IDENTIFIER_POINTER (TREE_PURPOSE (element)),
+ (unsigned HOST_WIDE_INT)
+ TREE_INT_CST_HIGH (TREE_VALUE (element)),
+ TREE_INT_CST_LOW (TREE_VALUE (element)));
+
pointer_set_insert (container->decls_seen, TREE_TYPE (decl));
if (TYPE_CANONICAL (TREE_TYPE (decl)) != NULL_TREE)
pointer_set_insert (container->decls_seen,