From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25449 invoked by alias); 16 Jun 2011 22:14:32 -0000 Received: (qmail 25440 invoked by uid 22791); 16 Jun 2011 22:14:31 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jun 2011 22:14:18 +0000 From: "neil.n.carlson at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/49213] [OOP] gfortran rejects structure constructor expression X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: neil.n.carlson at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 16 Jun 2011 22:14:00 -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 X-SW-Source: 2011-06/txt/msg01510.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49213 --- Comment #6 from neil.n.carlson at gmail dot com 2011-06-16 22:12:17 UTC --- (In reply to comment #5) > (In reply to comment #4) > > An intuitive way of viewing (and maybe even implementing I guess) the process > > triggered by a structure constructor [...] > > I think you are wrong here. > > F08:7.2.1.3p13: > > "An intrinsic assignment where the variable is of derived type [...] Sorry, I wasn't talking about intrinsic assignment. I was (unsuccessfully) trying to talk about what happens when a structure constructor expression, like T(Sobj) is encountered. The compiler has to generate a temporary object of type T and define its components, and what I was trying to say (and I might be wrong about this) is that this process of defining the components using the expressions given to the constructor is not like normal assignment (intrinsic or defined) of derived type objects. The reason for raising this was that the error messages suggest that that is how the compiler is viewing it. Sorry for the confusion.