aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-11-27 06:19:03 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-11-27 06:19:03 -0500
commit5ded5b76a2fc550b8c88c1684a44639a3d34823d (patch)
treee525514b73f7c348dd1189533de7ef78a2fe1e5b /gcc
parent9080bb7f040eeb15c96fe85691647f76db6155bd (diff)
downloadgcc-5ded5b76a2fc550b8c88c1684a44639a3d34823d.zip
gcc-5ded5b76a2fc550b8c88c1684a44639a3d34823d.tar.gz
gcc-5ded5b76a2fc550b8c88c1684a44639a3d34823d.tar.bz2
(pop_init_level): Ensure never on momentary_obstack when calling
complete_array_type. From-SVN: r6169
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-typeck.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 6550df2..15428e4 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -5235,11 +5235,14 @@ pop_init_level (implicit)
&& TYPE_DOMAIN (constructor_type) == 0)
{
int failure;
+ int momentary_p;
push_obstacks_nochange ();
if (TREE_PERMANENT (constructor_type))
end_temporary_allocation ();
+ momentary_p = suspend_momentary ();
+
/* We shouldn't have an incomplete array type within
some other type. */
if (constructor_stack->next)
@@ -5252,6 +5255,7 @@ pop_init_level (implicit)
abort ();
size = int_size_in_bytes (constructor_type);
+ resume_momentary (momentary_p);
pop_obstacks ();
}