From patchwork Wed Nov 6 15:14:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 288950 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 74ECF2C00D1 for ; Thu, 7 Nov 2013 02:14:59 +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:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=ZZ9VKDFxn6oMQyJoDNUPkKVl9I5E75aLSuAso0BkCk89V9bEcebWx mHiy78505pEpnf7zr5PZH3NhIFD7deQK2G3xR+Xh7uaqXFsfmNt7SLH5n7nPWpGY W5NcFvTkBoQwGsp0EqHCOeEoZKBZMutXF4iUyA3ljRfWfDSVs0I/WU= 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:subject:date:message-id:mime-version:content-type; s= default; bh=gufojzyjCw2ZKH20EntNWs/ngsg=; b=dXje2O0szcP6Iz8lIQHA Thv8LIoCO8INEBMB04quD8lqSlHxcWQDhy4xWrMNpEBee9eFS23DvudAaMV2LJoH 3LjfzCm/6MXQoWiinXxenghYSsCGR5tI/D/i09m0fkS0tJJEbjUca64vd+KLwdlS iO2tmo+6QiDIhj+ndemeaWA= Received: (qmail 9018 invoked by alias); 6 Nov 2013 15:14:48 -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 8999 invoked by uid 89); 6 Nov 2013 15:14:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_50, RDNS_NONE, SPF_PASS, T_TVD_MIME_NO_HEADERS, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-pa0-f52.google.com Received: from Unknown (HELO mail-pa0-f52.google.com) (209.85.220.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 06 Nov 2013 15:14:46 +0000 Received: by mail-pa0-f52.google.com with SMTP id bj1so10561006pad.25 for ; Wed, 06 Nov 2013 07:14:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-type; bh=PPcnFBVn1IplejT9POZ0JO7sxoZOD3c+yMNQ8KU5FMY=; b=Y4Kzfm3yJOxtEHwGQvT+ToJRQtHhEm/1LAvQdabD7MVG6zA7kEl7wqRzsE6MIx0/wg gGZ+URm7L7aAYgjvuLfv0hvBzoPunWXHOdMRhpbgohqbU7OHcvclLAwXZ3O6zy8tnfJE CqKe3i3OjWB5NgBiv+aGQ0zKx4BGFvU1o3ej6+wANLyDVwSs3yNj13Ksw1vQMlMWQn2n Uw7aphvWViD3eHn0+PzYgp7sm88W1WR5xKlNF3clwz+OWraZWEsdPggVYL/lPpmA+R2A 6hxrVSRuDAJ8m2I3/crLfsVuaWHI4axcYTbODEnzQWzmuEjViOU2HLdg8LabQpHazo/t 5J1A== X-Gm-Message-State: ALoCoQnrRsdRWP02a+Ufx/G2prN4iXFo2f7kDwJd3FgDz603OaD0NySRsbclui3sfTkbK3R711QobIKbebXMideWgIru5/rFTQBrVb+J0L+j2P7jTscwPUgBajaBZnK1p+4rxO5bhVyssPkNMtdcJWnB0HEq78ooa2PnbuJzW4rvkmqQP/sWbY8KVg2yMcWOIQ1C6rJluxjxc+JfIXsjPuplHH0V1QPcWA== X-Received: by 10.66.178.143 with SMTP id cy15mr4427858pac.105.1383750878203; Wed, 06 Nov 2013 07:14:38 -0800 (PST) Received: from iant-glaptop.roam.corp.google.com.google.com ([207.198.105.20]) by mx.google.com with ESMTPSA id ho3sm42066488pbb.23.2013.11.06.07.14.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 06 Nov 2013 07:14:37 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Go patch committed: Turn off -fisolate-erroneous-paths for Go Date: Wed, 06 Nov 2013 07:14:33 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes As discussed at the thread at http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00505.html , the new -fisolate-erroneous-paths option does not work for Go. The option can change nil pointer deferences into a trap, but for Go we want those to consistently be a panic. This patch disables the option for Go. If the option changes in a way that lets Go work, such as by disabling the option when using -fnon-call-exceptions, then this patch can be reverted. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 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: go-lang.c =================================================================== --- go-lang.c (revision 204430) +++ go-lang.c (working copy) @@ -268,6 +268,12 @@ 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; }