1 |
commit: c355f9b13f537be7717c3dafe1510976cdb8584e |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 14 17:57:26 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 14 17:57:26 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=c355f9b1 |
7 |
|
8 |
10.1.0: backport infinite loop in float print, bug #722774 |
9 |
|
10 |
Reported-by: Adrien Dessemond |
11 |
Bug: https://gcc.gnu.org/PR95118 |
12 |
Bug: https://bugs.gentoo.org/722774 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
10.1.0/gentoo/29_all_fix-float-hang-PR95118.patch | 54 +++++++++++++++++++++++ |
16 |
10.1.0/gentoo/README.history | 3 ++ |
17 |
2 files changed, 57 insertions(+) |
18 |
|
19 |
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 |
20 |
new file mode 100644 |
21 |
index 0000000..5be8649 |
22 |
--- /dev/null |
23 |
+++ b/10.1.0/gentoo/29_all_fix-float-hang-PR95118.patch |
24 |
@@ -0,0 +1,54 @@ |
25 |
+https://gcc.gnu.org/PR95118 |
26 |
+https://bugs.gentoo.org/722774 |
27 |
+ |
28 |
+From 568c985113b29574c4e25e1a016475668fc17c28 Mon Sep 17 00:00:00 2001 |
29 |
+From: Richard Biener <rguenther@××××.de> |
30 |
+Date: Thu, 14 May 2020 08:53:03 +0200 |
31 |
+Subject: [PATCH] middle-end/95118 - fix printing of denormal zero |
32 |
+ |
33 |
+This fixes printing a REAL_CST generated from value-numbering |
34 |
+punning some bits to a real which turns out as zero with big |
35 |
+negative exponent. This causes the loop in real_to_decimal_for_mode to |
36 |
+never terminate. |
37 |
+ |
38 |
+2020-05-14 Richard Biener <rguenther@××××.de> |
39 |
+ |
40 |
+ PR middle-end/95118 |
41 |
+ * real.c (real_to_decimal_for_mode): Make sure we handle |
42 |
+ a zero with nonzero exponent. |
43 |
+ |
44 |
+ * gcc.dg/pr95118.c: New testcase. |
45 |
+--- |
46 |
+ gcc/real.c | 4 ++-- |
47 |
+ gcc/testsuite/gcc.dg/pr95118.c | 11 +++++++++++ |
48 |
+ |
49 |
+--- a/gcc/real.c |
50 |
++++ b/gcc/real.c |
51 |
+@@ -1714,8 +1714,8 @@ real_to_decimal_for_mode (char *str, const REAL_VALUE_TYPE *r_orig, |
52 |
+ |
53 |
+ do_multiply (&u, &v, ten); |
54 |
+ |
55 |
+- /* Stop if we're now >= 1. */ |
56 |
+- if (REAL_EXP (&u) > 0) |
57 |
++ /* Stop if we're now >= 1 or zero. */ |
58 |
++ if (REAL_EXP (&u) > 0 || u.cl == rvc_zero) |
59 |
+ break; |
60 |
+ |
61 |
+ v = u; |
62 |
+--- /dev/null |
63 |
++++ b/gcc/testsuite/gcc.dg/pr95118.c |
64 |
+@@ -0,0 +1,11 @@ |
65 |
++/* { dg-do compile } */ |
66 |
++/* { dg-options "-O2 -fdump-tree-fre" } */ |
67 |
++ |
68 |
++void a(); |
69 |
++void b() { |
70 |
++ union { |
71 |
++ int c[4]; |
72 |
++ long double d; |
73 |
++ } e = {{0, 0, 4}}; |
74 |
++ a(e.d); |
75 |
++} |
76 |
+-- |
77 |
+2.26.2 |
78 |
+ |
79 |
|
80 |
diff --git a/10.1.0/gentoo/README.history b/10.1.0/gentoo/README.history |
81 |
index 96d5640..0ed3a9d 100644 |
82 |
--- a/10.1.0/gentoo/README.history |
83 |
+++ b/10.1.0/gentoo/README.history |
84 |
@@ -1,3 +1,6 @@ |
85 |
+2 TODO |
86 |
+ + 29_all_fix-float-hang-PR95118.patch |
87 |
+ |
88 |
1 05 May 2020 |
89 |
+ 01_all_default-fortify-source.patch |
90 |
+ 02_all_default-warn-format-security.patch |