From ea585788ba7c48bbeec2ed953224a06bb1ebe0ac Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 10 Dec 1998 15:08:45 +0000 Subject: [PATCH] decl.c (start_enum): Use push_obstacks, not end_temporary_allocation. * decl.c (start_enum): Use push_obstacks, not end_temporary_allocation. (finish_enum): Call pop_obstacks. From-SVN: r24244 --- gcc/cp/ChangeLog | 6 ++++++ gcc/testsuite/g++.old-deja/g++.other/crash6.C | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.other/crash6.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5348e3be200..fa24faee8d3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +1998-12-10 Mark Mitchell + + * decl.c (start_enum): Use push_obstacks, not + end_temporary_allocation. + (finish_enum): Call pop_obstacks. + 1998-12-10 Mark Mitchell * 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 index 00000000000..498c9833501 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/crash6.C @@ -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); +} -- 2.30.2