From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20392 invoked by alias); 20 Aug 2013 13:51:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20356 invoked by uid 48); 20 Aug 2013 13:51:34 -0000 From: "mikael at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/57590] [OOP] wrong code with class variables of different shapes Date: Tue, 20 Aug 2013 13:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mikael at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: janus at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg01041.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57590 --- Comment #7 from Mikael Morin --- (In reply to janus from comment #5) > (In reply to janus from comment #4) > > Will check if this survives a regtest. >=20 > Certainly not! At least we need to check if an as is present at all ... >=20 >=20 > Index: gcc/fortran/class.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- gcc/fortran/class.c (revision 201871) > +++ gcc/fortran/class.c (working copy) > @@ -636,7 +636,12 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_a > c->attr.dimension =3D attr->dimension; > c->attr.codimension =3D attr->codimension; > c->attr.abstract =3D fclass->attr.abstract; > - c->as =3D (*as); > + if (*as) > + { > + c->as =3D (*as); > + if (c->as->type =3D=3D AS_EXPLICIT) > + c->as->type =3D AS_ASSUMED_SHAPE; > + } > c->initializer =3D NULL; >=20=20 > /* Add component '_vptr'. */ Alright, certainly not the grand solution that I had in mind. It defeats the purpose of specifying array bounds explicitly. On the other hand, as it fix= es a wrong code, not that bad. >>From gcc-bugs-return-428118-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Aug 20 14:19:28 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 2135 invoked by alias); 20 Aug 2013 14:19:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 2107 invoked by uid 48); 20 Aug 2013 14:19:26 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/53655] [F03] "default initializer" warnings Date: Tue, 20 Aug 2013 14:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: janus at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg01042.txt.bz2 Content-length: 1171 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53655 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #7 from janus at gcc dot gnu.org --- (In reply to janus from comment #6) > The patch in comment 4 regtests cleanly. Will commit as obvious. Author: janus Date: Tue Aug 20 14:16:26 2013 New Revision: 201884 URL: http://gcc.gnu.org/viewcvs?rev=201884&root=gcc&view=rev Log: 2013-08-20 Janus Weil PR fortran/53655 * trans-decl.c (generate_local_decl): Check if type has any components. 2013-08-20 Janus Weil PR fortran/53655 * gfortran.dg/intent_out_8.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/intent_out_8.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog After this fixes case a), case b) turned out to be a non-bug and case c) has been fixed earlier, I think we can close this PR.