From patchwork Thu Jan 7 21:51:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 41673 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F10313971831; Thu, 7 Jan 2021 21:51:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F10313971831 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610056269; bh=VECqsOCzbdCgj/knO8n1wGISb+6DL4KUU2jJj+zePUE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RYT9h9SmqaOcHrjFsbmLzp7wxTQFzM1atkY6rrgZp8lH9K6LxHjcvY6GGAqZSNS+r m6PZ8I8Hw9GlRR9R21nX5zomW7nT4iRmY07QCqyKl2cOBFE+7PggoN5F+evRdjE8iR edz/l5pVeAQbyRCaxzwDMH3XSPfKfVcWoNRscuLU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id 7A08C3858023 for ; Thu, 7 Jan 2021 21:51:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7A08C3858023 Received: by mail-pj1-x1032.google.com with SMTP id m5so4877125pjv.5 for ; Thu, 07 Jan 2021 13:51:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VECqsOCzbdCgj/knO8n1wGISb+6DL4KUU2jJj+zePUE=; b=iXi5X7A24HCD4AoR3B/MyBmYd6yKuwVojjlN71f9wFdcil+OUKD4U0/dzKzCyVtd+U x1EVJvOsVeCopDk9tMOxW283RicoSCXU/aX6/jHQ0z2N2J83g/aX4/z0O2yv/TccX3Pa 9scrPK12XhO1WZc6/jXO9fh6WyT13gfsXwnhvrXA6SRhPtNiawp4FwTk2qFjPCLQPUyE qleiNjbtsqsmpzOXXgANAS3U1U4FnpPO29Rw4NstdYbDw5vHkm6NEH859iy4kXCcoh1W L23EfPVbPEbPyRiEpvXPqo4dit4/IjoTnCvp2truw6UKnJ2EiyaJXpUigG1+RKFUbcBQ Vnew== X-Gm-Message-State: AOAM5315RuAdT821Q/hNpqlgru+2eX1UsbEYsax5g2AIFj67L6bArqBR FC89cBUeqdM5k7CCp8U1KL7oiKPNs3E= X-Google-Smtp-Source: ABdhPJxq9GyZGkNgbT3Rh6vnoqMvkseTIHYYdyX7F1MMfP+t8v+P9/BZ4d1zzdVWQnDNOHYe5slfDg== X-Received: by 2002:a17:90a:c20b:: with SMTP id e11mr463199pjt.43.1610056265334; Thu, 07 Jan 2021 13:51:05 -0800 (PST) Received: from localhost (g178.219-103-173.ppp.wakwak.ne.jp. [219.103.173.178]) by smtp.gmail.com with ESMTPSA id p15sm7318808pgl.19.2021.01.07.13.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 13:51:04 -0800 (PST) To: GLIBC patches Subject: [RFC PATCH] math/testtgmath2: Fix breakage on fabs Vldouble1 due to optimization Date: Fri, 8 Jan 2021 06:51:00 +0900 Message-Id: <20210107215100.1594273-1-shorne@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Stafford Horne via Libc-alpha From: Stafford Horne Reply-To: Stafford Horne Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" I have been testing with GCC trunk and GLIBC master while working on OpenRISC ports. This test has been failing which fabs not being called, I am guessing this is due to new optimizations in GCC that are causing the Vldouble1 call to also be optimized out now, but I may be wrong. No other tests in math/* are failing for me exept for this one now. FAIL: math/test-tgmath2 original exit status 1 wrong function called, fabs (ldouble) failure on line 174 Note: I also added some details to the FAIL line to help track what issue caused the failure. --- Has anyone else seen this? math/test-tgmath2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/math/test-tgmath2.c b/math/test-tgmath2.c index 14a3453169..a9ede4ece7 100644 --- a/math/test-tgmath2.c +++ b/math/test-tgmath2.c @@ -122,7 +122,7 @@ int counts[Tlast][C_last]; __asm __volatile ("" : : "r" (&texpr)); \ if (count != 1 || counts[T##type][C_##fn] != 1) \ { \ - FAIL ("wrong function called"); \ + FAIL ("wrong function called, "#fn" ("#type")"); \ memset (counts, 0, sizeof (counts)); \ } \ count = 0; \ @@ -171,14 +171,15 @@ test_fabs (const int Vint4, const long long int Vllong4) TEST (fabs (vcldouble1), ldouble, cabs); TEST (fabs (Vfloat1), float, fabs); TEST (fabs (Vdouble1), double, fabs); - TEST (fabs (Vldouble1), ldouble, fabs); #ifndef __OPTIMIZE__ /* GCC is too smart to optimize these out. */ TEST (fabs (Vint1), double, fabs); TEST (fabs (Vllong1), double, fabs); + TEST (fabs (Vldouble1), ldouble, fabs); #else TEST_TYPE_ONLY (fabs (vllong1), double); TEST_TYPE_ONLY (fabs (vllong1), double); + TEST_TYPE_ONLY (fabs (Vldouble1), ldouble); #endif TEST (fabs (Vint4), double, fabs); TEST (fabs (Vllong4), double, fabs);