aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2017-01-04 00:58:34 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-01-04 00:58:34 +0000
commite4d02f5277072c691de079b3b8aa9b862e070a9e (patch)
tree65d8ececca5939b302ec9388044e162352a58d89 /gcc
parente7b0a53c68561db594a084bb4725c09721789bcd (diff)
downloadgcc-e4d02f5277072c691de079b3b8aa9b862e070a9e.zip
gcc-e4d02f5277072c691de079b3b8aa9b862e070a9e.tar.gz
gcc-e4d02f5277072c691de079b3b8aa9b862e070a9e.tar.bz2
godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
gcc/: * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE. gcc/testsuite/: * gcc.misc-tests/godump-1.c: Update for accurate representation of enums. From-SVN: r244041
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/godump.c5
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.misc-tests/godump-1.c8
4 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8828564..f7cf7c9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-03 Ian Lance Taylor <iant@google.com>
+
+ * godump.c (go_format_type): Treat ENUMERAL_TYPE like
+ INTEGER_TYPE.
+
2017-01-03 Martin Sebor <msebor@redhat.com>
PR tree-optimization/78696
diff --git a/gcc/godump.c b/gcc/godump.c
index 65a8b39..4884dee 100644
--- a/gcc/godump.c
+++ b/gcc/godump.c
@@ -722,10 +722,6 @@ go_format_type (struct godump_container *container, tree type,
switch (TREE_CODE (type))
{
- case ENUMERAL_TYPE:
- obstack_grow (ob, "int", 3);
- break;
-
case TYPE_DECL:
{
void **slot;
@@ -741,6 +737,7 @@ go_format_type (struct godump_container *container, tree type,
}
break;
+ case ENUMERAL_TYPE:
case INTEGER_TYPE:
{
const char *s;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c12b94a8..3b448dd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-03 Ian Lance Taylor <iant@google.com>
+
+ * gcc.misc-tests/godump-1.c: Update for accurate representation of
+ enums.
+
2017-01-03 Martin Sebor <msebor@redhat.com>
PR tree-optimization/78696
diff --git a/gcc/testsuite/gcc.misc-tests/godump-1.c b/gcc/testsuite/gcc.misc-tests/godump-1.c
index 675802b..ee984e5 100644
--- a/gcc/testsuite/gcc.misc-tests/godump-1.c
+++ b/gcc/testsuite/gcc.misc-tests/godump-1.c
@@ -373,7 +373,7 @@ enum { E11 };
/* { dg-final { scan-file godump-1.out "(?n)^const _E11 = 0$" } } */
enum { EV11 } e1_v1;
-/* { dg-final { scan-file godump-1.out "(?n)^var _e1_v1 int$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _e1_v1 u?int\[0-9\]*$" } } */
/* { dg-final { scan-file godump-1.out "(?n)^const _EV11 = 0$" } } */
enum { E21, E22 };
@@ -381,7 +381,7 @@ enum { E21, E22 };
/* { dg-final { scan-file godump-1.out "(?n)^const _E22 = 1$" } } */
enum { EV21, EV22 } e2_v1;
-/* { dg-final { scan-file godump-1.out "(?n)^var _e2_v1 int$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _e2_v1 u?int\[0-9\]*$" } } */
/* { dg-final { scan-file godump-1.out "(?n)^const _EV21 = 0$" } } */
/* { dg-final { scan-file godump-1.out "(?n)^const _EV22 = 1$" } } */
@@ -392,12 +392,12 @@ enum { EN1 = 3, EN2 = 77, EN3 = -1, EN4 };
/* { dg-final { scan-file godump-1.out "(?n)^const _EN4 = 0$" } } */
typedef enum { ET1, ET2 } et_t;
-/* { dg-final { scan-file godump-1.out "(?n)^type _et_t int$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^type _et_t u?int\[0-9\]*$" } } */
/* { dg-final { scan-file godump-1.out "(?n)^const _ET1 = 0$" } } */
/* { dg-final { scan-file godump-1.out "(?n)^const _ET2 = 1$" } } */
enum { ETV1, ETV2 } et_v1;
-/* { dg-final { scan-file godump-1.out "(?n)^var _et_v1 int$" } } */
+/* { dg-final { scan-file godump-1.out "(?n)^var _et_v1 u?int\[0-9\]*$" } } */
/* { dg-final { scan-file godump-1.out "(?n)^const _ETV1 = 0$" } } */
/* { dg-final { scan-file godump-1.out "(?n)^const _ETV2 = 1$" } } */