decl.c (start_enum): Use push_obstacks, not end_temporary_allocation.
authorMark Mitchell <mark@markmitchell.com>
Thu, 10 Dec 1998 15:08:45 +0000 (15:08 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 10 Dec 1998 15:08:45 +0000 (15:08 +0000)
* decl.c (start_enum): Use push_obstacks, not
end_temporary_allocation.
(finish_enum): Call pop_obstacks.

From-SVN: r24244

gcc/cp/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/crash6.C [new file with mode: 0644]

index 5348e3be2005e8628d21053e55db6159a68166d9..fa24faee8d32b05f73de6f6642b8245874bc2a61 100644 (file)
@@ -1,3 +1,9 @@
+1998-12-10  Mark Mitchell  <mark@markmitchell.com>
+
+       * decl.c (start_enum): Use push_obstacks, not
+       end_temporary_allocation.
+       (finish_enum): Call pop_obstacks.
+
 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
 
        * class.c (instantiate_type): Return error_mark_node rather than
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash6.C b/gcc/testsuite/g++.old-deja/g++.other/crash6.C
new file mode 100644 (file)
index 0000000..498c983
--- /dev/null
@@ -0,0 +1,19 @@
+// Build don't link:
+// Special g++ Options: -O2
+
+struct E
+{
+  int f(int);
+};
+
+int ha()
+{
+  enum {X = 0};
+
+  int A, C;
+
+  E vList[10];
+
+  A = (C + 1) % 3;
+  vList[1].f(A);
+}