From patchwork Fri Sep 26 13:23:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 393732 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1422D1400B2 for ; Fri, 26 Sep 2014 23:24:23 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=K6Jdkc4kLYuoPUP3 ne3fv7+jkhn9vHUI6jlWAh8CgmpIiI5pbhq0+wPSg/DHS/YjFQPnMKqU2ch9zQ4l 878UrpyliND1ZU44w7GTYeB3fXlwnUV8/id7EgBVkueBwyxiTU1a6IrPDQE7Nndz nKAi5zfnc90vSQ2jy6eHQfGSoj0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=vrFwd33xDWJJr3JY5epn9Y 10bLE=; b=eYIw0ueMKtMUZEnsiQxg5oIp4Vk7QhMg75OxaItjMI0FqDZbSiWXsc rAAI2OEjihPTMDVmLJQYmQP1TpwDM+2rTkdyzqxMJ8TMNMdVM28Q73e3GHmP+3Y0 Erh9m+zM8pEa0ZAW+xP9Q5qxnDG9be1JoLIeqx/aZdoJrTq6eqM7A= Received: (qmail 24996 invoked by alias); 26 Sep 2014 13:24:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24986 invoked by uid 89); 26 Sep 2014 13:24:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Sep 2014 13:24:11 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XXVVG-00006s-8Z from Thomas_Schwinge@mentor.com ; Fri, 26 Sep 2014 06:24:06 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Fri, 26 Sep 2014 14:24:04 +0100 From: Thomas Schwinge To: Maxim Ostapenko , Jeff Law , "Joseph S. Myers" CC: Jakub Jelinek , GCC Patches , Yury Gribov , Slava Garbuzov , Maxim Ostapenko , , , Yuri Gribov Subject: Re: [PATCH 2/2] Add patch for debugging compiler ICEs. In-Reply-To: <54251E1D.9050609@partner.samsung.com> References: <53F357DF.6010103@partner.samsung.com> <53FEDAC2.9050306@partner.samsung.com> <20140910045724.GB17454@tucnak.redhat.com> <5411CBC7.10706@partner.samsung.com> <54211DF0.5010104@partner.samsung.com> <5424675C.9020701@redhat.com> <54251E1D.9050609@partner.samsung.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (i486-pc-linux-gnu) Date: Fri, 26 Sep 2014 15:23:47 +0200 Message-ID: <87fvfefrbw.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Fri, 26 Sep 2014 12:04:45 +0400, Maxim Ostapenko wrote: > Thank you all for your help! > > Done in r215633. > > -Maxim > On 09/25/2014 11:05 PM, Jeff Law wrote: > > On 09/23/14 01:14, Maxim Ostapenko wrote: > >> > >> > >> 2014-09-04 Jakub Jelinek > >> Max Ostapenko > >> > >> * common.opt: New option. > >> * doc/invoke.texi: Describe new option. > >> * gcc.c (execute): Don't free first string early, but at the end > >> of the function. Call retry_ice if compiler exited with > >> ICE_EXIT_CODE. > >> (main): Factor out common code. > >> (print_configuration): New function. > >> (files_equal_p): Likewise. > >> (check_repro): Likewise. > >> (run_attempt): Likewise. > >> (do_report_bug): Likewise. > >> (append_text): Likewise. > >> (try_generate_repro): Likewise > > Approved. Please install. > > > > Thanks for your patience, > > Jeff This is causing compiler warnings, respectively bootstrap errors: [...] ../../master/gcc/gcc.c: In function 'attempt_status run_attempt(const char**, const char*, const char*, int, int)': ../../master/gcc/gcc.c:6319:15: error: variable 'errmsg' set but not used [-Werror=unused-but-set-variable] const char *errmsg; ^ ../../master/gcc/gcc.c: At global scope: ../../master/gcc/gcc.c:6412:33: error: unused parameter 'prog' [-Werror=unused-parameter] try_generate_repro (const char *prog, const char **argv) ^ cc1plus: all warnings being treated as errors Makefile:1040: recipe for target 'gcc.o' failed make[3]: *** [gcc.o] Error 1 make[3]: Leaving directory '/media/erich/home/thomas/tmp/gcc/hurd/master.build/gcc' Makefile:4285: recipe for target 'all-stage2-gcc' failed make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory '/media/erich/home/thomas/tmp/gcc/hurd/master.build' Makefile:21561: recipe for target 'stage2-bubble' failed make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory '/media/erich/home/thomas/tmp/gcc/hurd/master.build' Makefile:892: recipe for target 'all' failed make: *** [all] Error 2 OK to fix as follows? Only compile-tested, did not test the new -freport-bug functionality. Grüße, Thomas diff --git gcc/gcc.c gcc/gcc.c index e32ff47..47c4e28 100644 --- gcc/gcc.c +++ gcc/gcc.c @@ -253,7 +253,7 @@ static void init_gcc_specs (struct obstack *, const char *, const char *, static const char *convert_filename (const char *, int, int); #endif -static void try_generate_repro (const char *prog, const char **argv); +static void try_generate_repro (const char **argv); static const char *getenv_spec_function (int, const char **); static const char *if_exists_spec_function (int, const char **); static const char *if_exists_else_spec_function (int, const char **); @@ -2918,7 +2918,7 @@ execute (void) && i == 0 && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR)) && ! strncmp (p + 1, "cc1", 3)) - try_generate_repro (commands[0].prog, commands[0].argv); + try_generate_repro (commands[0].argv); if (WEXITSTATUS (status) > greatest_status) greatest_status = WEXITSTATUS (status); ret_code = -1; @@ -6332,6 +6332,16 @@ run_attempt (const char **new_argv, const char *out_temp, errmsg = pex_run (pex, pex_flags, new_argv[0], CONST_CAST2 (char *const *, const char **, &new_argv[1]), out_temp, err_temp, &err); + if (errmsg != NULL) + { + if (err == 0) + fatal_error (errmsg); + else + { + errno = err; + pfatal_with_name (errmsg); + } + } if (!pex_get_status (pex, 1, &exit_status)) goto out; @@ -6409,7 +6419,7 @@ append_text (char *file, const char *str) and preprocessed source code. */ static void -try_generate_repro (const char *prog, const char **argv) +try_generate_repro (const char **argv) { int i, nargs, out_arg = -1, quiet = 0, attempt; const char **new_argv;