From patchwork Fri Apr 19 16:17:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1925621 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=bBFHQ9wM; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VLfvg30f1z1yZP for ; Sat, 20 Apr 2024 02:18:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 340A8384770C for ; Fri, 19 Apr 2024 16:18:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 45C783849ACB for ; Fri, 19 Apr 2024 16:17:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 45C783849ACB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 45C783849ACB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713543479; cv=none; b=wzw6lGR9WAc9Q6lVbzpnjWnZ7wteuwO5teOYZY0j5t5xkn1Kthh/AySdXVRZs6ZXXfPEp0xJ2DsP6SP7z2poQ8SZWLwxbJzF0weH3I9wJqbyFAlnJsiroxYVl2UbaSxSoOWz4wi7yTamil83IPb0HSLT7iWeHTEAw74Ngt33QgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713543479; c=relaxed/simple; bh=ZfHcxy8JmsnsXQhrnbAXXF/nWNZVd5O21kU5B2J9vvQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=UqZ7pZ333mQ9zUqIigpw0KOBcjCt4HqdloXI8eiFbfYWm4yi7zZfxGFPY27GatzLB7K2mr+LEqz1ZjzdDV6BB/kF+R/7Zr+VGj08G+xYGX2cQOOsKUFgyA6f5gwlAPj+XNR/PF7YeI6WEdaqtCG6Fe7SHKC+5QIoom9Oo8fiwHk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713543475; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=BO7SSoVatPRIWeorUxvTV2NdS1KcUvpuTVSwzpKxKUY=; b=bBFHQ9wM+fyRdX4VOehZnBpMmrQJM77DRshCP97JBWUsq+hNcQZMzUz1hzTPvlZAWe5UIn Q6NUTfy0fw6hBDLdso5oRRBKuf9V/WAo4iY0SZL8hrw/+YQU9cZbKl6YsIQS5hZoZYk6RH YVGKnzjBgEYuL1VzXu7BxwIWUK2euIo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-465-BrCsGe4YOjmtnNHWqm_qxg-1; Fri, 19 Apr 2024 12:17:53 -0400 X-MC-Unique: BrCsGe4YOjmtnNHWqm_qxg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BA487823DF9 for ; Fri, 19 Apr 2024 16:17:52 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D9001121306 for ; Fri, 19 Apr 2024 16:17:52 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 43JGHo5U4136961 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Fri, 19 Apr 2024 18:17:50 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 43JGHoJe4136960 for gcc-patches@gcc.gnu.org; Fri, 19 Apr 2024 18:17:50 +0200 Date: Fri, 19 Apr 2024 18:17:50 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] internal-fn: Fix up expand_arith_overflow [PR114753] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Hi! During backporting I've noticed I've missed one return spot for the restoration of the original flag_trapv flag value. Tested on x86_64-linux, committed to trunk as obvious. Sorry. 2024-04-19 Jakub Jelinek PR middle-end/114753 * internal-fn.cc (expand_arith_overflow): Add one missing restore of flag_trapv before return. Jakub --- gcc/internal-fn.cc.jj 2024-04-18 09:45:08.079695875 +0200 +++ gcc/internal-fn.cc 2024-04-19 18:11:51.202204402 +0200 @@ -2793,6 +2793,7 @@ expand_arith_overflow (enum tree_code co case PLUS_EXPR: expand_addsub_overflow (loc, code, lhs, arg0, arg1, unsr_p, unsr_p, unsr_p, false, NULL); + flag_trapv = save_flag_trapv; return; case MULT_EXPR: expand_mul_overflow (loc, lhs, arg0, arg1, unsr_p,