+ yypstate *ps;
+
+ /* Make sure we don't try to free ps->yyss in this case. */
+ ps = yypstate_new ();
+ yypstate_delete (ps);
+
+ /* yypstate_delete used to leak ps->yyss if the stack was reallocated but the
+ parse did not return on success, syntax error, or memory exhaustion. */
+ ps = yypstate_new ();
+ assert (yypush_parse (ps, 'a', NULL) == YYPUSH_MORE);
+ yypstate_delete (ps);
+
+ ps = yypstate_new ();
+ assert (yypush_parse (ps, 'a', NULL) == YYPUSH_MORE);
+ assert (yypush_parse (ps, 'b', NULL) == YYPUSH_MORE);
+ yypstate_delete (ps);
+
+ return 0;
+}
+]])
+
+AT_BISON_CHECK([[-o input.c input.y]])
+AT_COMPILE([[input]])
+AT_PARSER_CHECK([[./input]])
+
+AT_CLEANUP
+
+## --------------------------- ##
+## Multiple impure instances. ##
+## --------------------------- ##
+
+AT_SETUP([[Multiple impure instances]])
+
+m4_pushdef([AT_MULTIPLE_IMPURE_INSTANCES_CHECK], [
+AT_DATA_GRAMMAR([[input.y]],
+[[
+%{
+ #include <assert.h>
+ #include <stdio.h>
+ void yyerror (char const *msg);
+ int yylex (void);
+%}
+
+%define api.push-pull ]$1[
+
+%%