2006-12-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Fri, 8 Dec 2006 18:14:21 +0000 (18:14 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Fri, 8 Dec 2006 18:14:21 +0000 (18:14 +0000)
* lib/target-supports.exp
(check_effective_target_large_long_double): New.
* gcc.dg/Wconversion-real.c : Use it.
* gcc.dg/Wconversion-integer.c : Fix for targets where char is
unsigned.

From-SVN: r119662

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wconversion-integer.c
gcc/testsuite/gcc.dg/Wconversion-real.c
gcc/testsuite/lib/target-supports.exp

index c86dcd2704d01997ec637cb58c01358edd1a0cc4..fe8632a881d0bd216a4c3e404270a31e4d6b5069 100644 (file)
@@ -1,3 +1,11 @@
+2006-12-08  Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+       * lib/target-supports.exp
+       (check_effective_target_large_long_double): New.  
+       * gcc.dg/Wconversion-real.c : Use it.  
+       * gcc.dg/Wconversion-integer.c : Fix for targets where char is
+       unsigned.
+
 2006-12-08  Mark Shinwell  <shinwell@codesourcery.com>
 
        * gcc.c-torture/execute/mode-dependent-address.c: New test.
index bab8062b777ffc8722c026f89698472f7bbe38d0..515aba30dbf47114158466b97fc314ad667c7819 100644 (file)
@@ -2,7 +2,7 @@
    These tests come from gcc/testsuite/gcc.dg/overflow-warn-2.c  */
 
 /* { dg-do compile } */
-/* { dg-options "-std=c99 -Wconversion" } */
+/* { dg-options "-std=c99 -fsigned-char -Wconversion" } */
 
 #include <limits.h>
 
index 53ac9a7e1b6577367cab11d097df3a4d55a6a297..877fcea391f676076e83e1a3ab731e8f131eb42f 100644 (file)
@@ -20,15 +20,15 @@ void h (void)
   ffloat (3.1); /* { dg-warning "conversion" } */
   vfloat = 3.1; /* { dg-warning "conversion" } */
   ffloat (3.1L); /* { dg-warning "conversion" } */
-  vfloat = 3.1L; /* { dg-warning "conversion" } */
-  fdouble (3.1L); /* { dg-warning "conversion" } */
-  vdouble = 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 } } */
   ffloat (vdouble); /* { dg-warning "conversion" } */
   vfloat = vdouble; /* { dg-warning "conversion" } */
   ffloat (vlongdouble); /* { dg-warning "conversion" } */
   vfloat = vlongdouble; /* { dg-warning "conversion" } */
-  fdouble (vlongdouble); /* { dg-warning "conversion" } */
-  vdouble = vlongdouble; /* { dg-warning "conversion" } */
+  fdouble (vlongdouble); /* { dg-warning "conversion" "" { target large_long_double } } */
+  vdouble = vlongdouble; /* { dg-warning "conversion" "" { target large_long_double } } */
 
 
   ffloat ((float) 3.1); 
index 4dd0b8e6e36e16cd159360e5b1f9f934535b6a07..221d17d474da30e909e5d42705bf6126065c3efb 100644 (file)
@@ -1118,6 +1118,16 @@ proc check_effective_target_lp64 { } {
     }]
 }
 
+# Return 1 if the target supports long double larger than double,
+# 0 otherwise.
+
+proc check_effective_target_large_long_double { } {
+    return [check_no_compiler_messages large_long_double object {
+       int dummy[sizeof(long double) > sizeof(double) ? 1 : -1];
+    }]
+}
+
+
 # Return 1 if the target supports compiling decimal floating point,
 # 0 otherwise.