* decl.c (enumerator_decl): Don't call gfc_free_enum_history
here.
(gfc_match_enumerator_def): But here whenever enumerator_decl returns
MATCH_ERROR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156709
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/43029
+ * decl.c (enumerator_decl): Don't call gfc_free_enum_history
+ here.
+ (gfc_match_enumerator_def): But here whenever enumerator_decl returns
+ MATCH_ERROR.
+
2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
Tobias Burnus <burnus@net-b.de>
if (initializer == NULL || initializer->ts.type != BT_INTEGER)
{
- gfc_error("ENUMERATOR %L not initialized with integer expression",
- &var_locus);
+ gfc_error ("ENUMERATOR %L not initialized with integer expression",
+ &var_locus);
m = MATCH_ERROR;
- gfc_free_enum_history ();
goto cleanup;
}
{
m = enumerator_decl ();
if (m == MATCH_ERROR)
- goto cleanup;
+ {
+ gfc_free_enum_history ();
+ goto cleanup;
+ }
if (m == MATCH_NO)
break;