From: Martin Liska Date: Tue, 2 Feb 2021 19:02:47 +0000 (+0100) Subject: Add test-case. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db53dd4f784d5d36c2119dd66a22ad40b5020b1c;p=gcc.git Add test-case. gcc/testsuite/ChangeLog: PR target/97510 * gcc.target/i386/pr97510.c: New test. --- diff --git a/gcc/testsuite/gcc.target/i386/pr97510.c b/gcc/testsuite/gcc.target/i386/pr97510.c new file mode 100644 index 00000000000..4f967b59c9a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr97510.c @@ -0,0 +1,18 @@ +/* PR target/97510 */ +/* { dg-do compile } */ +/* { dg-options "-Os -fexcess-precision=standard -mfpmath=387 -funsafe-math-optimizations" } */ + +float compute_rsqrt_ref_r_0; + +__attribute__((optimize(1))) +void compute_rsqrt_ref() { + compute_rsqrt_ref_r_0 = 1.0 / 0.0; +} + +int icompute_rsqrt_ref(float *); + +void test_512() { + float in[0]; + for (int i;;) + in[i] = 8.6756 * icompute_rsqrt_ref(in); +}