[testsuite] Further fixes to warn-abs-1.c

2018-10-11  Martin Jambor  <mjambor@suse.cz>

	testsuite/
	* gcc.dg/warn-abs-1.c: Guard tests assuming size of long double is
	greater that the size of double by target large_long double.

From-SVN: r265035
This commit is contained in:
Martin Jambor 2018-10-11 10:53:49 +02:00 committed by Martin Jambor
parent 46c6269045
commit e7336b8e23
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2018-10-11 Martin Jambor <mjambor@suse.cz>
* gcc.dg/warn-abs-1.c: Guard tests assuming size of long double is
greater that the size of double by target large_long double.
2018-10-11 Jakub Jelinek <jakub@redhat.com>
* g++.dg/cpp2a/feat-cxx2a.C: New test.

View File

@ -43,7 +43,7 @@ void
tst_float_size (double *pd, long double *pld)
{
*pd = fabsf (*pd); /* { dg-warning "may cause truncation of value" } */
*pld = fabs (*pld); /* { dg-warning "may cause truncation of value" } */
*pld = fabs (*pld); /* { dg-warning "may cause truncation of value" "fabs trunc" { target { large_long_double } } } */
*pld = fabs ((double) *pld);
}
@ -57,7 +57,7 @@ void tst_notcomplex (int *pi, long *pl, long double *pld)
void tst_cplx_size (complex double *pcd, complex long double *pcld)
{
*pcd = cabsf (*pcd); /* { dg-warning "may cause truncation of value" } */
*pcld = cabs (*pcld); /* { dg-warning "may cause truncation of value" } */
*pcld = cabs (*pcld); /* { dg-warning "may cause truncation of value" "cabs trunc" { target { large_long_double } } } */
*pcld = cabs ((complex double) *pcld);
}