From patchwork Thu Dec 5 16:41:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 297198 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2052B2C00AD for ; Fri, 6 Dec 2013 03:41:18 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=bXc4wyfF5CgJiQbbCm tNkAIGScV6nlCMVChmiz3dx0LJGPA/8cCrjm3jVDz81BcJYgSs4SpN7Cc8THhVQ+ fhPbG2EOGX6v0mjbmCjUhYoYxuHiMMqELQy0fhYdjluMlezEjql59s8khA6e3c+8 djuSeG5o2wx1jGD9NX+rkCJZE= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=58hu6QTcbS35odHH2iZ24fAi ghg=; b=o3nLFYl1+qSIbygDfzgrGawWcHMbtkbsbV10lu1X/yyxEwakIrX+kPsb tK06+lfzUTNG0CzGa5h93rHGO7tdzzRvWWxJHHdtlCYYWsB2pJfKkZYiRPW8gdqK vb3KIRjZJ4ZhNohN00QcR+tNfqR8zt5ShzksrjNj0JW6CLGC/Xk= Received: (qmail 13021 invoked by alias); 5 Dec 2013 16:41:12 -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 13005 invoked by uid 89); 5 Dec 2013 16:41:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oa0-f54.google.com Received: from Unknown (HELO mail-oa0-f54.google.com) (209.85.219.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 05 Dec 2013 16:41:10 +0000 Received: by mail-oa0-f54.google.com with SMTP id h16so18581674oag.41 for ; Thu, 05 Dec 2013 08:41:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=zH1kMMukJVB73jWfxxVBD4T/6THJadiDswmhS0yS3jA=; b=OZ38eMtCFqmEshLHz783HtndD1/vgDRbHvIWL4nMXU2hNST0Z2tZF/YyCWFFwY+hf4 dAzmSiRjRGXmDWR3TDNDocoxiBIw3rAfI29wWbQWQSWUZqif1uxoRoNRsUS/Lc5LPosG a7LPyBRhI5JfuowaDfxhinMOG+/GpoeIS2TxpvNSgtjPUGqdBLKAMgLQHEtl7fw3B6lv +FsvBSeG0DwS0ZIQY50LAejp1NLJQLECDMgxLR7x5XrpqX4rGVMypw0uHk2glbmrBrbY Y/5cfB8CHbXrPc43tNKcaTgN1sKD5qPOXZ+O3PZJnFsbNoSYJmwyHsIAa95PZzS8D7+J 16jg== X-Gm-Message-State: ALoCoQnRJbMo5rYUMMRPqMPuBTrKN11/xxqVHEOj2NF9814eqE+ox/Z3qri6YFsht5fr+VamETsAAXFEWKFpPJQ+5fXi8pMVtQ1YH3M8RmYukMLoBHu5NBR9TAQaH3Erv58GfE05x2f1dw47N6c5xmTdgUZVE4lulWobKe0YBZ1df3cE9CptOJeNMYFiMb3lD3INKTk0SO6M6XHqI67KvGwDD7u9SF5XFQ== MIME-Version: 1.0 X-Received: by 10.182.48.130 with SMTP id l2mr16026973obn.44.1386261662644; Thu, 05 Dec 2013 08:41:02 -0800 (PST) Received: by 10.60.44.179 with HTTP; Thu, 5 Dec 2013 08:41:02 -0800 (PST) In-Reply-To: <20131205081829.GZ30563@lug-owl.de> References: <529FF0C1.3090406@redhat.com> <20131205081829.GZ30563@lug-owl.de> Date: Thu, 5 Dec 2013 08:41:02 -0800 Message-ID: Subject: Re: [buildrobot] Re: [PATCH] Split -fisolate-erroneous-paths into two options From: Ian Lance Taylor To: Jan-Benedict Glaw Cc: Jeff Law , gcc-patches , "gofrontend-dev@googlegroups.com" X-IsSubscribed: yes On Thu, Dec 5, 2013 at 12:18 AM, Jan-Benedict Glaw wrote: > On Wed, 2013-12-04 20:19:29 -0700, Jeff Law wrote: >> This patch splits up the erroneous path optimization into two >> pieces. One which detects NULL dereferences and isolates those paths >> and a second which detects passing/returning a NULL pointer in cases >> where an attribute says a non-NULL value is required. > [...] > > This seems to break Go, see eg. > http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=50428 : > > g++ -c -DDEFAULT_TARGET_VERSION=\"4.9.0\" -DDEFAULT_TARGET_MACHINE=\"i686-pc-linux-gnu\" -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -Igo -I../../../gcc/gcc -I../../../gcc/gcc/go -I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include -I/opt/cfarm/mpc/include -I../../../gcc/gcc/../libdecnumber -I../../../gcc/gcc/../libdecnumber/bid -I../libdecnumber -I../../../gcc/gcc/../libbacktrace -o go/go-lang.o -MT go/go-lang.o -MMD -MP -MF go/.deps/go-lang.TPo ../../../gcc/gcc/go/go-lang.c > ../../../gcc/gcc/go/go-lang.c: In function ‘bool go_langhook_post_options(const char**)’: > ../../../gcc/gcc/go/go-lang.c:276:27: error: ‘struct gcc_options’ has no member named ‘x_flag_isolate_erroneous_paths’ > if (!global_options_set.x_flag_isolate_erroneous_paths) > ^ > ../../../gcc/gcc/go/go-lang.c:277:20: error: ‘struct gcc_options’ has no member named ‘x_flag_isolate_erroneous_paths’ > global_options.x_flag_isolate_erroneous_paths = 0; > ^ > make[2]: *** [go/go-lang.o] Error 1 I've committed this patch to mainline to fix this problem. I could have removed this code earlier but hadn't gotten around to it. Ian 2013-12-05 Ian Lance Taylor Revert this change; no longer required. 2013-11-06 Ian Lance Taylor * go-lang.c (go_langhook_post_options): If -fisolate-erroneous-paths was turned on by an optimization option, turn it off. Index: gcc/go/go-lang.c =================================================================== --- gcc/go/go-lang.c (revision 205710) +++ gcc/go/go-lang.c (working copy) @@ -270,12 +270,6 @@ go_langhook_post_options (const char **p if (flag_excess_precision_cmdline == EXCESS_PRECISION_DEFAULT) flag_excess_precision_cmdline = EXCESS_PRECISION_STANDARD; - /* The isolate_erroneous_paths optimization can change a nil - dereference from a panic to a trap, so we have to disable it for - Go, even though it is normally enabled by -O2. */ - if (!global_options_set.x_flag_isolate_erroneous_paths) - global_options.x_flag_isolate_erroneous_paths = 0; - /* Returning false means that the backend should be used. */ return false; }