From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17546 invoked by alias); 7 Jun 2008 16:17:54 -0000 Received: (qmail 17331 invoked by uid 48); 7 Jun 2008 16:17:12 -0000 Date: Sat, 07 Jun 2008 16:17:00 -0000 Message-ID: <20080607161712.17330.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/36371] [4.3/4.4 Regression] Wrong locus for errors in DATA statement In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault 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: 2008-06/txt/msg00407.txt.bz2 ------- Comment #1 from pault at gcc dot gnu dot org 2008-06-07 16:17 ------- (In reply to comment #0) This comes about, indirectly, because of simplification. Change the the index of the first item in the data list for 'c' to 2, for example. This can be tracked back to resolve.c (check_data_variable), where the call to gfc_check_assign is gfc_check_assign (var->expr, values.vnode->expr, 0); The rvalue, values.vnode->expr, is used for the locus in the error. Since it has been simplfied here, the error results. Using the lvalue expression at least hits the data statement. I notice that the only customer for gfc_check_assign with 'conform' == 0 is check_data_variable. It might be better to take account of this in the call. I'll do it. Paul -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2008-05-29 21:05:37 |2008-06-07 16:17:12 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36371