This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR fortran/68283 -- remove a rogue gfc_internal_error()
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 Nov 2015 10:34:50 -0800
- Subject: [PATCH] PR fortran/68283 -- remove a rogue gfc_internal_error()
- Authentication-results: sourceware.org; auth=none
This probably falls under the "obviously correct" moniker.
It has been built and tested on i386-*-freebsd. OK to commit?
The patch removes a gfc_internal_error(). I suspect that it
was originally put into gfortran to cover "correctly written
valid Fortran code cannot possibly ever hit this line of
code; so, it must be an internal error to reach this line".
The code in PR 68283 is not valid Fortran. A number of error
messages are spewed by gfortran prior to hitting this line of code.
The patch simply removes the gfc_internal_error(), which allows
gfortran to exit gracefully.
2015-11-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68283
* primary.c (gfc_variable_attr): Remove a gfc_internal_error().
--
Steve
Index: gcc/fortran/primary.c
===================================================================
--- gcc/fortran/primary.c (revision 229970)
+++ gcc/fortran/primary.c (working copy)
@@ -2268,8 +2268,6 @@ gfc_variable_attr (gfc_expr *expr, gfc_t
&& errors > 0)
break;
}
- if (n == ref->u.ar.as->rank)
- gfc_internal_error ("gfc_variable_attr(): Bad array reference");
}
break;