This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25031] [4.1 only] Allocatable array can be reallocated.
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Apr 2006 17:05:57 -0000
- Subject: [Bug fortran/25031] [4.1 only] Allocatable array can be reallocated.
- References: <bug-25031-9795@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from tkoenig at gcc dot gnu dot org 2006-04-08 17:05 -------
Subject: Bug 25031
Author: tkoenig
Date: Sat Apr 8 17:05:52 2006
New Revision: 112783
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112783
Log:
2006-04-08 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/25031
Backport from mainline
* trans-array.h: Adjust gfc_array_allocate prototype.
* trans-array.c (gfc_array_allocate): Change type of
gfc_array_allocatate to bool. Function returns true if
it operates on an array. Change second argument to gfc_expr.
Find last reference in chain.
If the function operates on an allocatable array, emit call to
allocate_array() or allocate64_array().
* trans-stmt.c (gfc_trans_allocate): Code to follow to last
reference has been moved to gfc_array_allocate.
* trans.h: Add declaration for gfor_fndecl_allocate_array and
gfor_fndecl_allocate64_array.
(gfc_build_builtin_function_decls): Add gfor_fndecl_allocate_array
and gfor_fndecl_allocate64_array.
2006-04-08 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/25031
Backport from mainline
* runtime/memory.c: Adjust copyright years.
(allocate_array): New function.
(allocate64_array): New function.
* libgfortran.h (error_codes): Add ERROR_ALLOCATION.
2006-04-08 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/25031
* gfortran.dg/multiple_allocation_1.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/multiple_allocation_1.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/trans-array.c
branches/gcc-4_1-branch/gcc/fortran/trans-array.h
branches/gcc-4_1-branch/gcc/fortran/trans-decl.c
branches/gcc-4_1-branch/gcc/fortran/trans-stmt.c
branches/gcc-4_1-branch/gcc/fortran/trans.h
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/libgfortran/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25031