This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33998] ICE in make_decl_rtl, at varasm.c:1263
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Dec 2007 11:34:29 -0000
- Subject: [Bug fortran/33998] ICE in make_decl_rtl, at varasm.c:1263
- References: <bug-33998-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pault at gcc dot gnu dot org 2007-12-16 11:34 -------
Subject: Bug 33998
Author: pault
Date: Sun Dec 16 11:34:08 2007
New Revision: 130988
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130988
Log:
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.
Added:
trunk/gcc/testsuite/gfortran.dg/mapping_1.f90
trunk/gcc/testsuite/gfortran.dg/mapping_2.f90
trunk/gcc/testsuite/gfortran.dg/mapping_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/dump-parse-tree.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33998