From patchwork Tue Aug 4 15:34:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 140607 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 48EB64BB3BA1 for ; Tue, 4 Aug 2026 15:35:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 48EB64BB3BA1 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fo0Na4t5 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 ESMTP id 7CABD4BB24E9 for ; Tue, 4 Aug 2026 15:35:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7CABD4BB24E9 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine 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 7CABD4BB24E9 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785857712; cv=none; b=cwCYcJyh1xE5Ds7qcwLsKfN8NbtJtXHhoyMC6cl8Kyx3GCV97ZnLueB+HJqy45zWkD+YUqXzW8sXzQPnQvzrqtusChvz3RQrtobFv643j5NSzQsiwi4gs5QuNMNGywqGyjcKtaMSeTtTr4iGJ4YAlzMnnu6nLmJ6g1lyryJ7pSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785857712; c=relaxed/simple; bh=EVJf5Bjsl7ceCExfmHx84YRR23+NeOylESfBKsqNhZs=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=vclG3/MogZdxdOx1hiop1JhbUuu1t8GvmQWIdbzzwvWyoMWg0IyZiZc/GUmROuO2wMZf0A+40oPRy4Tyue+u8RLzMuT18yLpwtnBYFy53/PhfeY9IpRRxKvtDFlmvD9o354yaKQtFyX3c7JMV3yOYJDVVI0k5bCJrQZ0LeSm7YU= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Fo0Na4t5 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CABD4BB24E9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785857712; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=tRkPypcjzoMsP/qRlSB2eTDGKA6Zjiddaq0s409KrQ8=; b=Fo0Na4t5+srW6V1ftM6d+yGVhLDt8LlSkfHH9nkrHxR9jJ3YOoaFhhIv/qr68Pz8AoJjvI utRlJzS/6QL08M7AQ9a8bCy9HIG1sQc5RHXayykVrHual9HFogwzNV9etqbSSKd3PcuFDc r5+CN/HxA2vJ8BSgncTgNOm+wj9hLLo= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-247-J5WK3J0rPACmofnPQ72u2Q-1; Tue, 04 Aug 2026 11:35:08 -0400 X-MC-Unique: J5WK3J0rPACmofnPQ72u2Q-1 X-Mimecast-MFC-AGG-ID: J5WK3J0rPACmofnPQ72u2Q_1785857707 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8E7FA1944F0E; Tue, 4 Aug 2026 15:34:56 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.44.48.80]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D2730300019F; Tue, 4 Aug 2026 15:34:55 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 674FYmKc3445713 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 4 Aug 2026 17:34:48 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 674FYhoE3445596; Tue, 4 Aug 2026 17:34:43 +0200 Date: Tue, 4 Aug 2026 17:34:37 +0200 From: Jakub Jelinek To: Richard Biener , Andrea Pinski , Torbjorn SVENSSON Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] testsuite: Fix up gcc.dg/pr126464.c test [PR126464] Message-ID: References: <575818de-b9e4-4594-b937-9f45ddac4e0f@foss.st.com> MIME-Version: 1.0 In-Reply-To: <575818de-b9e4-4594-b937-9f45ddac4e0f@foss.st.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: gfQzHBkLFKtBMuHsssxA4yayQmp0qgDJ4eLWmhYgcJA_1785857707 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, POISEN_SPAM_PILL, POISEN_SPAM_PILL_1, POISEN_SPAM_PILL_3, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NONE, TXREP shortcircuit=no autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on 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~patchwork=sourceware.org@gcc.gnu.org On Tue, Aug 04, 2026 at 02:13:19PM +0200, Torbjorn SVENSSON wrote: > This causes regression on most (all?) arm-none-eabi targets. > /build/gcc_src/gcc/testsuite/gcc.dg/pr126464.c:56:3: warning: floating constant exceeds range of 'long double' [-Woverflow] This patch guards it with preprocessor tests whether such floating point constants are representable. Tested on x86_64-linux, ok for trunk? 2026-08-04 Jakub Jelinek PR tree-optimization/126464 * gcc.dg/pr126464.c: Guard uses of 1e300 with __DBL_MAX_10_EXP__ >= 301 and uses of 1e4000L with __LDBL_MAX_10_EXP__ >= 4001. Jakub --- gcc/testsuite/gcc.dg/pr126464.c.jj 2026-07-30 09:56:33.400729346 +0200 +++ gcc/testsuite/gcc.dg/pr126464.c 2026-08-04 17:31:18.458149999 +0200 @@ -47,15 +47,19 @@ qux (long double x) int main () { +#if __DBL_MAX_10_EXP__ >= 301 if (!__builtin_isinf ((double) 1e300) && __builtin_isinf ((float) 1e300) && (foo (-1e300) != -5e299 || baz (1e300) != 5e299)) __builtin_abort (); +#endif +#if __LDBL_MAX_10_EXP__ >= 4001 if (!__builtin_isinf ((long double) 1e4000L) && __builtin_isinf ((double) 1e4000L) && (bar (1e4000L) != 5e3999L || qux (-1e4000L) != -5e3999L)) __builtin_abort (); +#endif }