From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5821 invoked by alias); 10 Sep 2013 15:29:20 -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 5801 invoked by uid 48); 10 Sep 2013 15:29:17 -0000 From: "martin at netbsd dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/58381] crash in diagnostic_report_current_module when a fatal_error happens during PCH processing on NetBSD/spa64rc Date: Tue, 10 Sep 2013 15:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: martin at netbsd dot org X-Bugzilla-Status: UNCONFIRMED 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: attachments.created 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: 2013-09/txt/msg00729.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58381 --- Comment #2 from Martin Husemann --- Created attachment 30790 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30790&action=edit Restore line_table and input_location before calling fatal_error when failing a pch load With this patch, the fatal_error is properly reported: > $BUILDDIR/stage1-gcc/xg++ -B $BUILDDIR/stage1-gcc -Werror -Winvalid-pch -Wno-deprecated -c conftest.cc conftest.cc:1:0: fatal error: had to relocate PCH #include "conftest.h" ^ compilation terminated.