From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 63C7A1382C5 for ; Thu, 14 May 2020 17:58:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 938DEE0997; Thu, 14 May 2020 17:58:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 678B9E0997 for ; Thu, 14 May 2020 17:58:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 61D47350D1C for ; Thu, 14 May 2020 17:58:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1046F211 for ; Thu, 14 May 2020 17:58:26 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1589479046.c355f9b13f537be7717c3dafe1510976cdb8584e.slyfox@gentoo> Subject: [gentoo-commits] proj/gcc-patches:master commit in: 10.1.0/gentoo/ X-VCS-Repository: proj/gcc-patches X-VCS-Files: 10.1.0/gentoo/29_all_fix-float-hang-PR95118.patch 10.1.0/gentoo/README.history X-VCS-Directories: 10.1.0/gentoo/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: c355f9b13f537be7717c3dafe1510976cdb8584e X-VCS-Branch: master Date: Thu, 14 May 2020 17:58:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b253c393-e003-4627-8012-30e21190374e X-Archives-Hash: 1da9c4d5611fb78d9fcd88b8ca7b8224 commit: c355f9b13f537be7717c3dafe1510976cdb8584e Author: Sergei Trofimovich gentoo org> AuthorDate: Thu May 14 17:57:26 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Thu May 14 17:57:26 2020 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=c355f9b1 10.1.0: backport infinite loop in float print, bug #722774 Reported-by: Adrien Dessemond Bug: https://gcc.gnu.org/PR95118 Bug: https://bugs.gentoo.org/722774 Signed-off-by: Sergei Trofimovich gentoo.org> 10.1.0/gentoo/29_all_fix-float-hang-PR95118.patch | 54 +++++++++++++++++++++++ 10.1.0/gentoo/README.history | 3 ++ 2 files changed, 57 insertions(+) diff --git a/10.1.0/gentoo/29_all_fix-float-hang-PR95118.patch b/10.1.0/gentoo/29_all_fix-float-hang-PR95118.patch new file mode 100644 index 0000000..5be8649 --- /dev/null +++ b/10.1.0/gentoo/29_all_fix-float-hang-PR95118.patch @@ -0,0 +1,54 @@ +https://gcc.gnu.org/PR95118 +https://bugs.gentoo.org/722774 + +From 568c985113b29574c4e25e1a016475668fc17c28 Mon Sep 17 00:00:00 2001 +From: Richard Biener +Date: Thu, 14 May 2020 08:53:03 +0200 +Subject: [PATCH] middle-end/95118 - fix printing of denormal zero + +This fixes printing a REAL_CST generated from value-numbering +punning some bits to a real which turns out as zero with big +negative exponent. This causes the loop in real_to_decimal_for_mode to +never terminate. + +2020-05-14 Richard Biener + + PR middle-end/95118 + * real.c (real_to_decimal_for_mode): Make sure we handle + a zero with nonzero exponent. + + * gcc.dg/pr95118.c: New testcase. +--- + gcc/real.c | 4 ++-- + gcc/testsuite/gcc.dg/pr95118.c | 11 +++++++++++ + +--- a/gcc/real.c ++++ b/gcc/real.c +@@ -1714,8 +1714,8 @@ real_to_decimal_for_mode (char *str, const REAL_VALUE_TYPE *r_orig, + + do_multiply (&u, &v, ten); + +- /* Stop if we're now >= 1. */ +- if (REAL_EXP (&u) > 0) ++ /* Stop if we're now >= 1 or zero. */ ++ if (REAL_EXP (&u) > 0 || u.cl == rvc_zero) + break; + + v = u; +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/pr95118.c +@@ -0,0 +1,11 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -fdump-tree-fre" } */ ++ ++void a(); ++void b() { ++ union { ++ int c[4]; ++ long double d; ++ } e = {{0, 0, 4}}; ++ a(e.d); ++} +-- +2.26.2 + diff --git a/10.1.0/gentoo/README.history b/10.1.0/gentoo/README.history index 96d5640..0ed3a9d 100644 --- a/10.1.0/gentoo/README.history +++ b/10.1.0/gentoo/README.history @@ -1,3 +1,6 @@ +2 TODO + + 29_all_fix-float-hang-PR95118.patch + 1 05 May 2020 + 01_all_default-fortify-source.patch + 02_all_default-warn-format-security.patch