This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, fortran, obvious] PR fortran/50129 gfc_enforce_clean_symbol_state ICE after rejecting an ELSEWHERE statement


Hello, 

I'm going to commit the following (to trunk and 4.6) once the regression test 
finishes.

Mikael

Attachment: pr50129.CL
Description: Text document

diff --git a/parse.c b/parse.c
index aab711c..9b11086 100644
--- a/parse.c
+++ b/parse.c
@@ -2778,6 +2778,7 @@ parse_where_block (void)
 	    {
 	      gfc_error ("ELSEWHERE statement at %C follows previous "
 			 "unmasked ELSEWHERE");
+	      reject_statement ();
 	      break;
 	    }
 
! { dg-do compile }
!
! PR fortran/50129
! ICE after reporting an error on a masked ELSEWHERE statement following an
! unmasked one.
!
! Contributed by Joost Van de Vondele <Joost.VandeVondele@pci.uzh.ch>

INTEGER :: I(3)
WHERE (I>2)
ELSEWHERE
ELSEWHERE (I<1) ! { dg-error "follows previous unmasked ELSEWHERE" }
END WHERE
END


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]