summaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.c
diff options
context:
space:
mode:
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-16 11:34:08 +0000
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-16 11:34:08 +0000
commitfd149f9599604ae22c3f8febad21b49f819069eb (patch)
treec6e129ef80118a2e0bb434b7c9e4f55264aa7514 /gcc/fortran/dump-parse-tree.c
parentb2d919a895ca56b408b08e6aa1d14ef1dca781d3 (diff)
downloadgcc-fd149f9599604ae22c3f8febad21b49f819069eb.tar.gz
2007-12-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31213 PR fortran/33888 PR fortran/33998 * trans-array.c (gfc_trans_array_constructor_value): If the iterator variable does not have a backend_decl, use a local temporary. (get_elemental_fcn_charlen): New function to map the character length of an elemental function onto its actual arglist. (gfc_conv_expr_descriptor): Call the above so that the size of the temporary can be evaluated. * trans-expr.c : Include arith.h and change prototype of gfc_apply_interface_mapping_to_expr to return void. Change all references to gfc_apply_interface_mapping_to_expr accordingly. (gfc_free_interface_mapping): Free the 'expr' field. (gfc_add_interface_mapping): Add an argument for the actual argument expression. This is copied to the 'expr' field of the mapping. Only stabilize the backend_decl if the se is present. Copy the character length expression and only add it's backend declaration if se is present. Return without working on the backend declaration for the new symbol if se is not present. (gfc_map_intrinsic_function) : To simplify intrinsics 'len', 'size', 'ubound' and 'lbound' and then to map the result. (gfc_map_fcn_formal_to_actual): Performs the formal to actual mapping for the case of a function found in a specification expression in the interface being mapped. (gfc_apply_interface_mapping_to_ref): Remove seen_result and all its references. Remove the inline simplification of LEN and call gfc_map_intrinsic_function instead. Change the order of mapping of the actual arguments and simplifying intrinsic functions. Finally, if a function maps to an actual argument, call gfc_map_fcn_formal_to_actual. (gfc_conv_function_call): Add 'e' to the call to gfc_add_interface_mapping. * dump-parse-tree.c (gfc_show_symbol_n): New function for diagnostic purposes. * gfortran.h : Add prototype for gfc_show_symbol_n. * trans.h : Add 'expr' field to gfc_add_interface_mapping. Add 'expr' to prototype for gfc_show_symbol_n. * resolve.c (resolve_generic_f0): Set specific function as referenced. 2007-12-16 Paul Thomas <pault@gcc.gnu.org> PR fortran/31213 PR fortran/33888 PR fortran/33998 * gfortran.dg/mapping_1.f90: New test. * gfortran.dg/mapping_2.f90: New test. * gfortran.dg/mapping_3.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130988 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
-rw-r--r--gcc/fortran/dump-parse-tree.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index f9c92b272e6..ea83da76cff 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -731,6 +731,17 @@ gfc_show_symbol (gfc_symbol *sym)
}
+/* Show a symbol for diagnostic purposes. */
+void
+gfc_show_symbol_n (const char * msg, gfc_symbol *sym)
+{
+ if (msg)
+ gfc_status (msg);
+ gfc_show_symbol (sym);
+ gfc_status_char ('\n');
+}
+
+
/* Show a user-defined operator. Just prints an operator
and the name of the associated subroutine, really. */