aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2006-11-07 15:17:17 +0000
committerPaul Thomas <pault@gcc.gnu.org>2006-11-07 15:17:17 +0000
commit8f81c3c650cb19b50c44d52639fc05738736c88a (patch)
treee381d60e6698b9bdf2995a250640098b1187c13a /gcc/fortran/decl.c
parent36b8206084f7c4812f565e01d86ccf711e60b702 (diff)
downloadgcc-8f81c3c650cb19b50c44d52639fc05738736c88a.zip
gcc-8f81c3c650cb19b50c44d52639fc05738736c88a.tar.gz
gcc-8f81c3c650cb19b50c44d52639fc05738736c88a.tar.bz2
re PR fortran/29539 (ICE in variable_decl)
2006-11-07 Paul Thomas <pault@gcc.gnu.org> PR fortran/29539 PR fortran/29634 * decl.c (variable_decl): Add test for presence of proc_name. * error.c (gfc_error_flag_test): New function. * gfortran.h : Prototype for gfc_error_flag_test. 2006-11-07 Paul Thomas <pault@gcc.gnu.org> PR fortran/29539 * gfortran.dg/gfortran.dg/blockdata_3.f90: New test. PR fortran/29634 * gfortran.dg/gfortran.dg/derived_function_interface_1.f90: New test. From-SVN: r118553
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index a476c64..ec3ce2e 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1218,6 +1218,7 @@ variable_decl (int elem)
that the interface may specify a procedure that is not pure if the procedure
is defined to be pure(12.3.2). */
if (current_ts.type == BT_DERIVED
+ && gfc_current_ns->proc_name
&& gfc_current_ns->proc_name->attr.if_source == IFSRC_IFBODY
&& current_ts.derived->ns != gfc_current_ns)
{
@@ -2397,7 +2398,8 @@ ok:
break;
}
- gfc_error ("Syntax error in data declaration at %C");
+ if (gfc_error_flag_test () == 0)
+ gfc_error ("Syntax error in data declaration at %C");
m = MATCH_ERROR;
gfc_free_data_all (gfc_current_ns);