------- Comment #4 from uttamp at us dot ibm dot com 2005-12-09 21:40 -------
I did build and completed the regression test. The patch in comment #3 fixes
this problem (when compiled with -pedantic option) but gfortran still fails to
report this as an error with -std=f95 without -pedantic.
I've created a new patch where I took the Steven's patch and added GFC_STD_F95
along with pedantic check.
About the error message, how about,
"Construct name on END DO at %L does not match the Named DO construct", sounds?
Below, I'm listing the patch for completeness. Can somebody look at it pease?
Thansks,
Uttam
--- gcc_org/gcc/gcc/fortran/parse.c 2005-11-30 09:56:16.000000000 -0800
+++ gcc/gcc/fortran/parse.c 2005-12-09 13:33:32.000000000 -0800
@@ -23,6 +23,7 @@ Software Foundation, 51 Franklin Street,
#include "config.h"
#include "system.h"
+#include "flags.h"
#include <setjmp.h>
#include "gfortran.h"
#include "match.h"
@@ -2057,6 +2058,10 @@ loop:
break;
case ST_IMPLIED_ENDDO:
+ if ((pedantic || GFC_STD_F95) && gfc_current_block () != NULL)
+ gfc_error_now
+ ("Construct name on END DO at %L does not match the Named DO
construct",
+ &gfc_current_block()->declared_at);
break;
default:
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20839