aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-02-05 15:59:45 -0500
committerJason Merrill <jason@redhat.com>2024-02-05 16:35:17 -0500
commitd49780c08aade447953bfe4e877d386f5757f165 (patch)
treeb1561eb02bc0ab963399e484b4e4d117fa738ec5 /gcc
parent106cc847c5cda948efd4bc20910e79258b5313ed (diff)
downloadgcc-d49780c08aade447953bfe4e877d386f5757f165.zip
gcc-d49780c08aade447953bfe4e877d386f5757f165.tar.gz
gcc-d49780c08aade447953bfe4e877d386f5757f165.tar.bz2
c++: -frounding-math test [PR109359]
This test was fixed by the patch for PR95226, but that patch had no testcase so let's add this one. PR c++/109359 gcc/testsuite/ChangeLog: * g++.dg/ext/frounding-math1.C: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/ext/frounding-math1.C8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/frounding-math1.C b/gcc/testsuite/g++.dg/ext/frounding-math1.C
new file mode 100644
index 0000000..ecc46fd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/frounding-math1.C
@@ -0,0 +1,8 @@
+// PR c++/109359
+// { dg-additional-options -frounding-math }
+
+// For a while we were emitting two doubles (4 .long directives) as the value
+// of a float array; it should only be two .longs.
+
+// { dg-final { scan-assembler-times "long" 2 { target x86_64-*-* } } }
+float xs[] = {0.001914, 0.630539};