From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13167 invoked by alias); 15 Jun 2015 20:12:32 -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 13140 invoked by uid 48); 15 Jun 2015 20:12:28 -0000 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66545] ICE on using undefined parameter/variable values Date: Mon, 15 Jun 2015 20:12: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: 5.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: tkoenig at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc assigned_to everconfirmed 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: 2015-06/txt/msg01365.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66545 Thomas Koenig changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2015-06-15 CC| |tkoenig at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Thomas Koenig --- This fixes the complex part, the others need their own parts. Index: primary.c =================================================================== --- primary.c (Revision 224450) +++ primary.c (Arbeitskopie) @@ -1254,6 +1254,13 @@ match_sym_complex_part (gfc_expr **result) return MATCH_ERROR; } + if (sym->value == NULL) + { + gfc_error ("PARAMETER %qs is used at %C before its definition " + "is complete", sym->name); + return MATCH_ERROR; + } + if (!gfc_numeric_ts (&sym->value->ts)) { gfc_error ("Numeric PARAMETER required in complex constant at %C");