From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118347 invoked by alias); 18 Aug 2015 19:56: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 Received: (qmail 118284 invoked by uid 48); 18 Aug 2015 19:55:56 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/67192] Backward-goto in loop can get wrong line number Date: Tue, 18 Aug 2015 19:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01266.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67192 Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #8 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Andreas Arnez from comment #7) > I'm curious why this would lead to the problem seen, and whether that's > working as intended. When looking at c_finish_loop(), I see: > SET_EXPR_LOCATION (t, start_locus); > where t seems to be the GOTO_EXPR for the backward-goto and start_locus is > the location of the beginning of the loop. Naively I would conclude that > the GOTO_EXPR is intended to have the location of the *beginning* of the > loop. But neither before nor after your patch this seems to be the case? No, it is the goto that corresponds to the loop exit: /* If we have an exit condition, then we build an IF with gotos either out of the loop, or to the top of it. If there's no exit conditio= n, then we just build a jump back to the top. */ exit =3D build_and_jump (&LABEL_EXPR_LABEL (top)); however, that exit does not have a valid location, thus it is added at add_= stmt a few lines below: if (CAN_HAVE_LOCATION_P (t) && code !=3D LABEL_EXPR) { if (!EXPR_HAS_LOCATION (t)) SET_EXPR_LOCATION (t, input_location); } It is surprising that c_parser_peek_token changes input_location and this doesn't mess up everything else. I wonder what is the benefit of having input_location at all if we need to keep saving and restoring it all the ti= me. Does GCC work at all if input_location is saved and restored in c_parser_peek_token? I guess not, it seems too much still relies in input_location being magically right. >>From gcc-bugs-return-495125-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Aug 18 19:56:58 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 119616 invoked by alias); 18 Aug 2015 19:56:58 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 119572 invoked by uid 55); 18 Aug 2015 19:56:54 -0000 From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/66936] io/unix.c gratuitously uses S_IRWXG and S_IRWXO on the basis that umask() is available Date: Tue, 18 Aug 2015 19:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: fxcoudert at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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-08/txt/msg01267.txt.bz2 Content-length: 462 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66936 --- Comment #19 from Francois-Xavier Coudert --- Author: fxcoudert Date: Tue Aug 18 19:56:20 2015 New Revision: 226988 URL: https://gcc.gnu.org/viewcvs?rev=226988&root=gcc&view=rev Log: PR libfortran/66936 * io/unix.c (__MINGW32__): Undefine HAVE_UMASK. Modified: branches/gcc-5-branch/libgfortran/ChangeLog branches/gcc-5-branch/libgfortran/io/unix.c