This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29916] [4.1 and 4.2 only] Dimension of a function result as host association does not work
- 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: 9 Dec 2006 15:17:44 -0000
- Subject: [Bug fortran/29916] [4.1 and 4.2 only] Dimension of a function result as host association does not work
- References: <bug-29916-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from pault at gcc dot gnu dot org 2006-12-09 15:17 -------
Subject: Bug 29916
Author: pault
Date: Sat Dec 9 15:17:16 2006
New Revision: 119690
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119690
Log:
2006-12-09 Paul Thomas <pault@gcc.gnu.org>
Backports from trunk
PR fortran/29821
* resolve.c (resolve_operator): Only return result of
gfc_simplify_expr if expression is constant.
PR fortran/29912
* trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL if the
lhs and rhs character lengths are not constant and equal for
character array valued functions.
PR fortran/29916
* resolve.c (resolve_symbol): Allow host-associated variables
in the specification expression of an array-valued function.
* expr.c (check_restricted): Accept host-associated dummy
array indices.
PR fortran/30003
* trans-array.c (gfc_trans_create_temp_array): Set the section
ends to zero.
(gfc_conv_array_transpose): Likewise.
(gfc_conv_section_startstride): Declare an expression for end,
set it from a the array reference and evaluate it for the info
structure. Zero the ends in the ss structure and set end, used
in the bounds check, from the info structure.
trans.h: Add and end array to the gfc_ss_info structure.
2006-12-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29821
* gfortran.dg/parameter_array_section_1.f90: New test.
PR fortran/29912
* gfortran.dg/char_result_12.f90: New test.
PR fortran/29916
* gfortran.dg/host_dummy_index_1.f90: Added additional test.
PR fortran/30003
* gfortran.dg/allocatable_function_1.f90: Increase the number
of expected calls of free to 10; the lhs section reference is
now evaluated so there is another call to bar. Change the
comment appropriately.
* gfortran.dg/array_section_1.f90: New test.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/array_section_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/char_result_12.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/parameter_array_section_1.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/expr.c
branches/gcc-4_2-branch/gcc/fortran/resolve.c
branches/gcc-4_2-branch/gcc/fortran/trans-array.c
branches/gcc-4_2-branch/gcc/fortran/trans-expr.c
branches/gcc-4_2-branch/gcc/fortran/trans.h
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/allocatable_function_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/host_dummy_index_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29916