This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52102] [OOP] Wrong result with ALLOCATE of CLASS components with array constructor SOURCE-expr
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 05 Feb 2012 19:56:16 +0000
- Subject: [Bug fortran/52102] [OOP] Wrong result with ALLOCATE of CLASS components with array constructor SOURCE-expr
- Auto-submitted: auto-generated
- References: <bug-52102-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52102
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> 2012-02-05 19:56:16 UTC ---
Author: pault
Date: Sun Feb 5 19:56:09 2012
New Revision: 183915
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183915
Log:
2012-02-05 Paul Thomas <pault@gcc.gnu.org>
* trans-array.c (gfc_array_allocate): Zero memory for all class
array allocations.
* trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
PR fortran/52102
* trans-stmt.c (gfc_trans_allocate): Before correcting a class
array reference, ensure that 'dataref' points to the _data
component that is followed by the array reference..
2012-02-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/52102
* gfortran.dg/class_48.f90 : Add test of allocate class array
component with source in subroutine test3. Remove commenting
out in subroutine test4, since branching on unitialized variable
is now fixed (no PR for this last.).
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/class_48.f90