From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4378 invoked by alias); 13 Jan 2014 14:09:40 -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 4266 invoked by uid 48); 13 Jan 2014 14:09:34 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/25096] Non-conforming shapes of DATA object and data Date: Mon, 13 Jan 2014 14:09: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.1.0 X-Bugzilla-Keywords: accepts-invalid, diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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: 2014-01/txt/msg01360.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25096 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #5 from Dominique d'Humieres --- (In reply to comment #4) > > just a question. why is this illegal ? > > it is R528 in the section on the data statement of the F2003 standard > that suggests this has to be a scalar-structure-component. Not so obvious why, > if you ask me. R528 for F2003 is > R528 data-i-do-object is array-element > or scalar-structure-component > or data-implied-do It differs from F95 > R534 data-stmt-object is variable > or data-implied-do None of them rules out data-implied-do, so I think g95 is wrong (it still rejects the code if I replace '8*0' with '4*0'. I have no doubt that TYPE T1 INTEGER :: I(2) END TYPE T1 TYPE(T1) :: D(4) DATA (D(i)%I,i=1,4) /4*0/ END is valid and I did not find where n*v for n>'number of elements to initialize' is forbidden by the standards. Closing as INVALID.