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.

From-SVN: r119662
This commit is contained in:
Manuel López-Ibáñez 2006-12-08 18:14:21 +00:00
parent fd13de7772
commit 4efc447f98
4 changed files with 24 additions and 6 deletions

View 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.

View 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>

View 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);

View 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.