rpms/gcc/devel gcc41-pr30360.patch,NONE,1.1 gcc41.spec,1.136,1.137
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Jan 5 00:34:58 UTC 2007
Author: jakub
Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26145
Modified Files:
gcc41.spec
Added Files:
gcc41-pr30360.patch
Log Message:
4.1.1-51
gcc41-pr30360.patch:
libgcc2.c | 2 +-
testsuite/gcc.dg/pr30360.c | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
--- NEW FILE gcc41-pr30360.patch ---
2007-01-04 Jakub Jelinek <jakub at redhat.com>
PR c/30360
* libgcc2.c (__divdc3): Compare c and d against 0.0 instead of
denom against 0.0.
* gcc.dg/pr30360.c: New test.
--- gcc/libgcc2.c.jj 2006-11-11 18:21:08.000000000 +0100
+++ gcc/libgcc2.c 2007-01-04 15:49:14.000000000 +0100
@@ -1909,7 +1909,7 @@ CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b,
are nonzero/zero, infinite/finite, and finite/infinite. */
if (isnan (x) && isnan (y))
{
- if (denom == 0.0 && (!isnan (a) || !isnan (b)))
+ if (c == 0.0 && d == 0.0 && (!isnan (a) || !isnan (b)))
{
x = COPYSIGN (INFINITY, c) * a;
y = COPYSIGN (INFINITY, c) * b;
--- gcc/testsuite/gcc.dg/pr30360.c.jj 2007-01-04 15:20:40.000000000 +0100
+++ gcc/testsuite/gcc.dg/pr30360.c 2007-01-04 15:26:57.000000000 +0100
@@ -0,0 +1,25 @@
+/* PR c/30360 */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* s390*-*-linux* } } */
+/* { dg-options "-O2 -std=gnu99" } */
+
+#define I (__extension__ 1.0iF)
+#define H(x) asm ("" : "=m" (x) : "m" (x))
+extern void abort (void);
+
+int
+main (void)
+{
+ _Complex double a = 1.0 + 1.0 * I, b = 0.0, c;
+ H (a);
+ H (b);
+ c = a / b;
+ if (!__builtin_isinf (__real__ c) && !__builtin_isinf (__imag__ c))
+ abort ();
+ a = 0.0;
+ H (a);
+ H (b);
+ c = a / b;
+ if (!__builtin_isnan (__real__ c) || !__builtin_isnan (__imag__ c))
+ abort ();
+ return 0;
+}
Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -r1.136 -r1.137
--- gcc41.spec 4 Jan 2007 09:57:02 -0000 1.136
+++ gcc41.spec 5 Jan 2007 00:34:56 -0000 1.137
@@ -153,6 +153,7 @@
Patch44: gcc41-pr28217.patch
Patch45: gcc41-pr30189.patch
Patch46: gcc41-rh220627.patch
+Patch47: gcc41-pr30360.patch
%define _gnu %{nil}
%ifarch sparc
%define gcc_target_platform sparc64-%{_vendor}-%{_target_os}
@@ -474,6 +475,7 @@
%patch44 -p0 -b .pr28217~
%patch45 -p0 -b .pr30189~
%patch46 -p0 -b .rh220627~
+%patch47 -p0 -b .pr30360~
sed -i -e 's/4\.1\.2/4.1.1/' gcc/BASE-VER gcc/version.c
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1545,8 +1547,9 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
-* Thu Jan 4 2007 David Woodhouse <dwmw2 at redhat.com> 4.1.1-51
-- Bootstrap Ada on PowerPC
+* Thu Jan 4 2007 Jakub Jelinek <jakub at redhat.com> 4.1.1-51
+- bootstrap Ada on ppc32 (David Woodhouse)
+- fix complex division with -std=c99 or -std=gnu99 (PR c/30360)
* Wed Jan 3 2007 Jakub Jelinek <jakub at redhat.com> 4.1.1-50
- backwards compatibility with old layout of struct _Unwind_Context
More information about the fedora-cvs-commits
mailing list