Commit e8753bb8 by Martin Jambor Committed by Martin Jambor

[PR 87339] Fix failure of gcc.dg/warn-abs-1.c on some targets

2018-09-25  Martin Jambor  <mjambor@suse.cz>

	PR testsuite/87339
	* gcc.dg/warn-abs-1.c: Do not test _Float128.  Remove dg-skip-if and
	float125 target.
	* gcc.target/i386/warn-abs-3.c: New test.

From-SVN: r264579
parent 84848f51
2018-09-25 Martin Jambor <mjambor@suse.cz>
PR testsuite/87339
* gcc.dg/warn-abs-1.c: Do not test _Float128. Remove dg-skip-if and
float125 target.
* gcc.target/i386/warn-abs-3.c: New test.
2018-09-25 Paolo Carlini <paolo.carlini@oracle.com> 2018-09-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/81246 PR c++/81246
......
/* { dg-do compile { target float128 } } */ /* { dg-do compile } */
/* { dg-skip-if "incomplete long double support" { { newlib } && large_long_double } } */
/* { dg-options "-Wabsolute-value" } */ /* { dg-options "-Wabsolute-value" } */
#include <stdlib.h> #include <stdlib.h>
...@@ -41,12 +40,11 @@ tst_notfloat (int *pi, long *pl, complex double *pc) ...@@ -41,12 +40,11 @@ tst_notfloat (int *pi, long *pl, complex double *pc)
} }
void void
tst_float_size (double *pd, long double *pld, _Float128 *pf128) tst_float_size (double *pd, long double *pld)
{ {
*pd = fabsf (*pd); /* { dg-warning "may cause truncation of value" } */ *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" } */
*pld = fabs ((double) *pld); *pld = fabs ((double) *pld);
*pf128 = fabsl (*pf128); /* { dg-warning "may cause truncation of value" } */
} }
void tst_notcomplex (int *pi, long *pl, long double *pld) void tst_notcomplex (int *pi, long *pl, long double *pld)
......
/* { dg-do compile { target float128 } } */
/* { dg-options "-Wabsolute-value" } */
#include <stdlib.h>
#include <inttypes.h>
#include <math.h>
void
tst_float128_size (_Float128 *pf128)
{
*pf128 = fabsl (*pf128); /* { dg-warning "may cause truncation of value" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment