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: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Feb 2012 08:22:20 +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
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
Summary|[OOP] Wrong result with |[OOP] Wrong result with
|ALLOCATE w/ SOURCE= and |ALLOCATE of CLASS
|nonpoly. array constructor |components with array
|source-expr |constructor SOURCE-expr
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-03 08:22:20 UTC ---
(In reply to comment #0)
> Should give for two%a(1)%x and two%a(2)%x the values 4 and 6, but one gets
> 0 0. If one uses not a class component but a class variable, the result
> is 4 0.
Correction: The latter works "4 6", thus, only CLASS components are affected.
> print *, one%a(1)%x
> print *, one%a(6)%x
The last line should use "(2)" not "(6)". [It only should print "6" at run
time.]