aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/st.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2013-08-09 21:26:07 +0200
committerJanus Weil <janus@gcc.gnu.org>2013-08-09 21:26:07 +0200
commit11e5274a4bb2ae1338c8b447c9880ace43aac129 (patch)
tree0ac9c4560a8ad95d76c1854f90668bda6feda0ad /gcc/fortran/st.c
parent2fa3d31bd6bb9274abaa3a7d59cc88e9a6112194 (diff)
downloadgcc-11e5274a4bb2ae1338c8b447c9880ace43aac129.zip
gcc-11e5274a4bb2ae1338c8b447c9880ace43aac129.tar.gz
gcc-11e5274a4bb2ae1338c8b447c9880ace43aac129.tar.bz2
gfortran.h (gfc_get_code): Modified prototype.
2013-08-09 Janus Weil <janus@gcc.gnu.org> * gfortran.h (gfc_get_code): Modified prototype. * class.c (finalize_component, finalization_scalarizer, finalization_get_offset, finalizer_insert_packed_call, generate_finalization_wrapper, gfc_find_derived_vtab, gfc_find_intrinsic_vtab): Use 'gfc_get_code'. * io.c (match_io_iterator, match_io_element, terminate_io, get_io_list, gfc_match_inquire): Call 'gfc_get_code' with argument. * match.c (match_simple_forall, gfc_match_forall, gfc_match_goto, gfc_match_nullify, gfc_match_call, match_simple_where, gfc_match_where): Ditto. * parse.c (new_level): Ditto. (add_statement): Use XCNEW. * resolve.c (resolve_entries, resolve_allocate_expr, resolve_select_type, build_assignment, build_init_assign): Call 'gfc_get_code' with argument. * st.c (gfc_get_code): Add argument 'op'. * trans-expr.c (gfc_trans_class_array_init_assign): Call 'gfc_get_code' with argument. * trans-stmt.c (gfc_trans_allocate): Ditto. From-SVN: r201635
Diffstat (limited to 'gcc/fortran/st.c')
-rw-r--r--gcc/fortran/st.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/st.c b/gcc/fortran/st.c
index 836dac7..f8b341c 100644
--- a/gcc/fortran/st.c
+++ b/gcc/fortran/st.c
@@ -41,14 +41,16 @@ gfc_clear_new_st (void)
}
-/* Get a gfc_code structure. */
+/* Get a gfc_code structure, initialized with the current locus
+ and a statement code 'op'. */
gfc_code *
-gfc_get_code (void)
+gfc_get_code (gfc_exec_op op)
{
gfc_code *c;
c = XCNEW (gfc_code);
+ c->op = op;
c->loc = gfc_current_locus;
return c;
}