This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41714] [OOP] ALLOCATE SOURCE= does not properly copy the value from SOURCE
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2009 13:55:46 -0000
- Subject: [Bug fortran/41714] [OOP] ALLOCATE SOURCE= does not properly copy the value from SOURCE
- References: <bug-41714-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from dominiq at lps dot ens dot fr 2009-10-25 13:55 -------
The patches in comment #1 and #5 seem to work as advertized (currently
regtesting).
After having looked at the f2003 standard draft, I understand that
allocate(a, source=t2(1,2))
is equivalent to
allocate(t2::a)
a%i=1
a%j=2
With this change the compilation fails with:
pr41714_db.f90:12.3:
a%j=2
1
Error: 'j' at (1) is not a member of the 't' structure
Did I missed something in the standard or is this a bug?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41714