This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Handle TARGET_96_ROUND_53_LONG_DOUBLE, part II


This patch kills another 4 gratitious FAILs for
TARGET_96_ROUND_53_LONG_DOUBLE targets (of which, only
i386-unknown-freebsd* is publicly known).

OK, to commit?

Regards,
Loren

2009-09-30  Loren J. Rittle  <ljrittle@acm.org>

	* c-c++-common/Wconversion-real.c: Handle
	TARGET_96_ROUND_53_LONG_DOUBLE.

Index: gcc/testsuite/c-c++-common/Wconversion-real.c
===================================================================
--- gcc/testsuite/c-c++-common/Wconversion-real.c	(revision 152307)
+++ gcc/testsuite/c-c++-common/Wconversion-real.c	(working copy)
@@ -24,8 +24,10 @@
   vfloat = 3.1; /* { dg-warning "conversion" } */
   ffloat (3.1L); /* { dg-warning "conversion" } */
   vfloat = 3.1L;  /* { dg-warning "conversion" } */
-  fdouble (3.1L); /* { dg-warning "conversion" "" { target large_long_double } } */
-  vdouble = 3.1L; /* { dg-warning "conversion" "" { target large_long_double } } */
+  /* On i386 ports with TARGET_96_ROUND_53_LONG_DOUBLE, conversion of 3.1L */
+  /* to 3.1 happens (correctly) without triggering the warning. */
+  fdouble (__DBL_MANT_DIG__ == __LDBL_MANT_DIG__ ? 3.1e409L : 3.1L); /* { dg-warning "conversion" "" { target large_long_double } } */
+  vdouble = __DBL_MANT_DIG__ == __LDBL_MANT_DIG__ ? 3.1e409L : 3.1L; /* { dg-warning "conversion" "" { target large_long_double } } */
   ffloat (vdouble); /* { dg-warning "conversion" } */
   vfloat = vdouble; /* { dg-warning "conversion" } */
   ffloat (vlongdouble); /* { dg-warning "conversion" } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]