From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15761 invoked by alias); 27 Dec 2009 15:57:36 -0000 Received: (qmail 15697 invoked by uid 48); 27 Dec 2009 15:57:19 -0000 Date: Sun, 27 Dec 2009 15:57:00 -0000 Message-ID: <20091227155719.15696.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42484] ICE with -fopenmp In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "janus at gcc dot gnu dot org" 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: 2009-12/txt/msg02502.txt.bz2 ------- Comment #9 from janus at gcc dot gnu dot org 2009-12-27 15:57 ------- Here is a patch which fixes the ICE, and gives the correct error messages: Index: gcc/fortran/trans.c =================================================================== --- gcc/fortran/trans.c (revision 155304) +++ gcc/fortran/trans.c (working copy) @@ -1043,7 +1043,9 @@ void gfc_set_backend_locus (locus * loc) { gfc_current_backend_file = loc->lb->file; - input_location = loc->lb->location; + /* 'loc->lb->location' only gives the location of the start of the line, + so we add the column number here. */ + input_location = loc->lb->location + loc->nextc - loc->lb->line; } Index: gcc/fortran/match.c =================================================================== --- gcc/fortran/match.c (revision 155304) +++ gcc/fortran/match.c (working copy) @@ -1602,7 +1602,7 @@ got_match: p = gfc_get_code (); p->next = gfc_get_code (); *p->next = new_st; - p->next->loc = gfc_current_locus; + p->next->loc = old_loc2; p->expr1 = expr; p->op = EXEC_IF; -- janus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-12-27 15:57:18 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42484