From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104969 invoked by alias); 3 Jan 2019 12:41:58 -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 104958 invoked by uid 89); 3 Jan 2019 12:41:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=principle, U*amodra, sk:amodra, sk:amodra@ X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Jan 2019 12:41:56 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3AB38EBD; Thu, 3 Jan 2019 04:41:55 -0800 (PST) Received: from localhost (unknown [10.32.98.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8DCBC3F5D4; Thu, 3 Jan 2019 04:41:54 -0800 (PST) From: Richard Sandiford To: Alan Modra Mail-Followup-To: Alan Modra ,gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] genattrtab bit-rot, and if_then_else in values References: <20190103092154.GZ30978@bubble.grove.modra.org> Date: Thu, 03 Jan 2019 12:41:00 -0000 In-Reply-To: <20190103092154.GZ30978@bubble.grove.modra.org> (Alan Modra's message of "Thu, 3 Jan 2019 19:51:54 +1030") Message-ID: <87a7khsyjz.fsf@arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-01/txt/msg00100.txt.bz2 Alan Modra writes: > + case PLUS: > + current_or = or_attr_value (XEXP (exp, 0)); > + if (current_or != -1) > + { > + int n = current_or; > + current_or = or_attr_value (XEXP (exp, 1)); > + if (current_or != -1) > + current_or += n; > + } > + break; This doesn't look right. Doing the same for IOR and |= would be OK in principle, but write_attr_value doesn't handle IOR yet. OK with the above dropped, thanks. Richard PS. current write_attr_value doesn't seem to handle operator precedence properly, but that's orthogonal.