aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r--gcc/fortran/primary.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index 36e5eb9..888caff 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -1117,7 +1117,10 @@ match_complex_constant (gfc_expr ** result)
m = match_complex_part (&real);
if (m == MATCH_NO)
- goto cleanup;
+ {
+ gfc_free_error (&old_error);
+ goto cleanup;
+ }
if (gfc_match_char (',') == MATCH_NO)
{
@@ -1132,7 +1135,10 @@ match_complex_constant (gfc_expr ** result)
sort. These sort of lists are matched prior to coming here. */
if (m == MATCH_ERROR)
- goto cleanup;
+ {
+ gfc_free_error (&old_error);
+ goto cleanup;
+ }
gfc_pop_error (&old_error);
m = match_complex_part (&imag);