From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8747 invoked by alias); 21 Sep 2016 13:51:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 8733 invoked by uid 89); 21 Sep 2016 13:51:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Sep 2016 13:51:48 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 2742A8134F; Wed, 21 Sep 2016 15:51:46 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vx9ImiIRDvkN; Wed, 21 Sep 2016 15:51:46 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id E067D812FE; Wed, 21 Sep 2016 15:51:45 +0200 (CEST) From: Eric Botcazou To: Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: Re: [patch] Fix ICE on ACATS test for Aarch64 at -O Date: Wed, 21 Sep 2016 14:02:00 -0000 Message-ID: <2471951.zg1fsCkSXl@polaris> User-Agent: KMail/4.14.10 (Linux/3.16.7-42-desktop; KDE/4.14.9; x86_64; ; ) In-Reply-To: <73ddb77a-0c10-f73b-25e6-9088acdd139b@redhat.com> References: <1566344.Esnov9ALD2@polaris> <73ddb77a-0c10-f73b-25e6-9088acdd139b@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2016-09/txt/msg01416.txt.bz2 > Is this really safe. If I look at where we call > expand_shift/expand_shift_1 I get real worried that we could end up > using that NULL value in a context where it's not expected. > > So while emit_store_flag_force knows what to do upon NULL return, I'm > not sure the other users of expand_shift/expand_shift_1 do. Yes, that's probably risky, and there are a lot of calls to them. > Is there any way to address this problem in emit_store_flag_force? Now that we're in C++, we could add an additional argument to expand_shift_1 with a default value and call the function directly from emit_store_flag with the non-default value, thus instructing it to return 0 on failure instead of aborting. emit_store_flag already returns 0 on failure so the result would be naturally propagated up to emit_store_flag_force. -- Eric Botcazou