From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15911 invoked by alias); 6 Apr 2011 13:20:44 -0000 Received: (qmail 15898 invoked by uid 22791); 6 Apr 2011 13:20:43 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Wed, 06 Apr 2011 13:20:38 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/48478] Array-constructor with type-spec: reject valid/accept invalid X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: accepts-invalid, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org 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: Status Keywords Last reconfirmed CC Ever Confirmed Summary 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: Wed, 06 Apr 2011 13:20: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-04/txt/msg00567.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48478 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |accepts-invalid, | |rejects-valid Last reconfirmed| |2011.04.06 13:20:35 CC| |burnus at gcc dot gnu.org Ever Confirmed|0 |1 Summary|Valid array-constructor |Array-constructor with |syntax rejected/invalid |type-spec: reject |accepted |valid/accept invalid --- Comment #1 from Tobias Burnus 2011-04-06 13:20:35 UTC --- Confirmed. I first thought that it used to work properly (I cannot check at the moment), but I now think that I mixed it up with "ALLOCATE ( type-spec :: ...)" which has the the same syntax. Thus, the fix should be trivial: To use the same as for allocate. match.c's gfc_match_allocate has: m = match_type_spec (&ts); While array.c's gfc_match_array_constructor uses: if (gfc_match_decl_type_spec (&ts, 0) == MATCH_YES) (One should make sure that the array constructor also works in initialization expressions, it might use a different code path.)