aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/symbol.c
diff options
context:
space:
mode:
authorMikael Morin <mikael@gcc.gnu.org>2010-08-02 15:30:47 +0000
committerMikael Morin <mikael@gcc.gnu.org>2010-08-02 15:30:47 +0000
commitef973f3f4b72e19f6e1354f4cbd9f387bbb7e510 (patch)
tree1b3eba31b52898eea06166444e90925e4c80c906 /gcc/fortran/symbol.c
parent13cc4787bfdee0fa3d1cfe7b73f9d2492eb3320c (diff)
downloadgcc-ef973f3f4b72e19f6e1354f4cbd9f387bbb7e510.zip
gcc-ef973f3f4b72e19f6e1354f4cbd9f387bbb7e510.tar.gz
gcc-ef973f3f4b72e19f6e1354f4cbd9f387bbb7e510.tar.bz2
re PR fortran/42051 ([OOP] ICE on array-valued function with CLASS formal argument)
2010-08-02 Mikael Morin <mikael@gcc.gnu.org> Janus Weil <janus@gcc.gnu.org> PR fortran/42051 PR fortran/44064 PR fortran/45151 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol. * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param, gfc_copy_formal_args, gfc_copy_formal_args_intr, gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto. * parse.c (parse_derived_contains, parse_spec, parse_progunit): Call reject_statement in case of error. (match_deferred_characteritics): Call gfc_undo_symbols in case match fails. Co-Authored-By: Janus Weil <janus@gcc.gnu.org> From-SVN: r162821
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r--gcc/fortran/symbol.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 0231da1..a4d0ec3 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -3880,6 +3880,9 @@ gen_cptr_param (gfc_formal_arglist **head,
formal_arg = gfc_get_formal_arglist ();
/* Add arg to list of formal args (the CPTR arg). */
add_formal_arg (head, tail, formal_arg, param_sym);
+
+ /* Validate changes. */
+ gfc_commit_symbol (param_sym);
}
@@ -3925,6 +3928,9 @@ gen_fptr_param (gfc_formal_arglist **head,
formal_arg = gfc_get_formal_arglist ();
/* Add arg to list of formal args. */
add_formal_arg (head, tail, formal_arg, param_sym);
+
+ /* Validate changes. */
+ gfc_commit_symbol (param_sym);
}
@@ -3997,6 +4003,9 @@ gen_shape_param (gfc_formal_arglist **head,
formal_arg = gfc_get_formal_arglist ();
/* Add arg to list of formal args. */
add_formal_arg (head, tail, formal_arg, param_sym);
+
+ /* Validate changes. */
+ gfc_commit_symbol (param_sym);
}
@@ -4059,6 +4068,9 @@ gfc_copy_formal_args (gfc_symbol *dest, gfc_symbol *src)
/* Add arg to list of formal args. */
add_formal_arg (&head, &tail, formal_arg, formal_arg->sym);
+
+ /* Validate changes. */
+ gfc_commit_symbol (formal_arg->sym);
}
/* Add the interface to the symbol. */
@@ -4116,6 +4128,9 @@ gfc_copy_formal_args_intr (gfc_symbol *dest, gfc_intrinsic_sym *src)
/* Add arg to list of formal args. */
add_formal_arg (&head, &tail, formal_arg, formal_arg->sym);
+
+ /* Validate changes. */
+ gfc_commit_symbol (formal_arg->sym);
}
/* Add the interface to the symbol. */
@@ -4169,6 +4184,9 @@ gfc_copy_formal_args_ppc (gfc_component *dest, gfc_symbol *src)
/* Add arg to list of formal args. */
add_formal_arg (&head, &tail, formal_arg, formal_arg->sym);
+
+ /* Validate changes. */
+ gfc_commit_symbol (formal_arg->sym);
}
/* Add the interface to the symbol. */
@@ -4548,6 +4566,7 @@ generate_isocbinding_symbol (const char *mod_name, iso_c_binding_symbol s,
default:
gcc_unreachable ();
}
+ gfc_commit_symbol (tmp_sym);
}