aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2013-01-07 19:30:11 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2013-01-07 19:30:11 +0100
commite35e87dc46b7e9ad4486987db50587e33e643802 (patch)
tree3a9480c88f19cd4763bd9faefc109274acf20a90 /gcc/fortran/decl.c
parent7f7162cf5700702acde3db65fbe4cca61dbe1a2f (diff)
downloadgcc-e35e87dc46b7e9ad4486987db50587e33e643802.zip
gcc-e35e87dc46b7e9ad4486987db50587e33e643802.tar.gz
gcc-e35e87dc46b7e9ad4486987db50587e33e643802.tar.bz2
re PR fortran/55763 (Issues with some simpler CLASS(*) programs)
2013-01-07 Tobias Burnus <burnus@net-b.de> PR fortran/55763 * gfortran.h (gfc_check_assign_symbol): Update prototype. * decl.c (add_init_expr_to_sym, do_parm): Update call. * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and improve error location; support components. (gfc_check_pointer_assign): Handle component assignments. * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol. (resolve_values): Update call. (resolve_structure_cons): Avoid double diagnostic. 2013-01-07 Tobias Burnus <burnus@net-b.de> PR fortran/55763 * gfortran.dg/pointer_init_2.f90: Update dg-error. * gfortran.dg/pointer_init_7.f90: New. From-SVN: r194990
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 2e6e98a..3a36cad 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1353,14 +1353,14 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)
if (sym->ts.type != BT_DERIVED && init->ts.type != BT_DERIVED
&& sym->ts.type != BT_CLASS && init->ts.type != BT_CLASS
&& !sym->attr.proc_pointer
- && gfc_check_assign_symbol (sym, init) == FAILURE)
+ && gfc_check_assign_symbol (sym, NULL, init) == FAILURE)
return FAILURE;
if (sym->ts.type == BT_CHARACTER && sym->ts.u.cl
&& init->ts.type == BT_CHARACTER)
{
/* Update symbol character length according initializer. */
- if (gfc_check_assign_symbol (sym, init) == FAILURE)
+ if (gfc_check_assign_symbol (sym, NULL, init) == FAILURE)
return FAILURE;
if (sym->ts.u.cl->length == NULL)
@@ -6955,7 +6955,7 @@ do_parm (void)
goto cleanup;
}
- if (gfc_check_assign_symbol (sym, init) == FAILURE
+ if (gfc_check_assign_symbol (sym, NULL, init) == FAILURE
|| gfc_add_flavor (&sym->attr, FL_PARAMETER, sym->name, NULL) == FAILURE)
{
m = MATCH_ERROR;