From: Jakub Jelinek Date: Thu, 28 Feb 2019 13:49:38 +0000 (+0100) Subject: re PR c/89521 (ICE in expand_builtin_int_roundingfn, at builtins.c:2697) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8bd326535cdb03a48c592573358cce95e5b7d040;p=gcc.git re PR c/89521 (ICE in expand_builtin_int_roundingfn, at builtins.c:2697) PR c/89521 * gcc.dg/pr89521-1.c: New test. * gcc.dg/pr89521-2.c: New test. From-SVN: r269280 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a32df6c62bd..79de60324e3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-02-28 Jakub Jelinek + + PR c/89521 + * gcc.dg/pr89521-1.c: New test. + * gcc.dg/pr89521-2.c: New test. + 2019-02-28 John David Anglin PR testsuite/89441 diff --git a/gcc/testsuite/gcc.dg/pr89521-1.c b/gcc/testsuite/gcc.dg/pr89521-1.c new file mode 100644 index 00000000000..ebf2c5932c3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr89521-1.c @@ -0,0 +1,13 @@ +/* PR c/89521 */ +/* { dg-do compile } */ +/* { dg-options "-Ofast -w" } */ + +#define A(name) __typeof (__builtin_##name (0)) name (); long name##1 () { return name (1); } +#define B(name) A(name) A(name##f) A(name##l) +B (ceil) +B (floor) +B (round) +B (trunc) +B (nearbyint) +B (rint) +B (logb) diff --git a/gcc/testsuite/gcc.dg/pr89521-2.c b/gcc/testsuite/gcc.dg/pr89521-2.c new file mode 100644 index 00000000000..5e37c918fc2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr89521-2.c @@ -0,0 +1,42 @@ +/* PR c/89521 */ +/* { dg-do compile } */ +/* { dg-options "-Ofast -w" } */ + +#define A(name) __typeof (__builtin_##name (0)) name (); \ + float name##1 () { return name (1); } \ + double name##2 () { return name (1); } +#define B(name) A(name) A(name##l) +B (cosh) +B (exp) +B (exp10) +B (exp2) +B (expm1) +B (gamma) +B (j0) +B (j1) +B (lgamma) +B (pow10) +B (sinh) +B (tgamma) +B (y0) +B (y1) +B (acos) +B (acosh) +B (asin) +B (asinh) +B (atan) +B (atanh) +B (cbrt) +B (cos) +B (erf) +B (erfc) +B (log) +B (log10) +B (log2) +B (log1p) +B (sin) +B (tan) +B (tanh) +B (sqrt) +B (fabs) +B (logb)