aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-20 10:06:42 +0000
committerJakub Jelinek <jakub@redhat.com>2019-11-20 10:06:42 +0000
commit9f3d9a570819cb522d2ff3e36c04f742c3870537 (patch)
tree8531ed8dcb46358788a528f026095e0bee664ef7 /gcc/testsuite/gcc.c-torture/execute/20190901-1.c
parent522f3b741606e806f058efcdf6474f2cdcc56718 (diff)
parentc59fa98026086e9886257fce39d27dcfd16cc4f6 (diff)
svn merge -r274943:278492 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branchredhat/gcc-9-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-9-branch@278493 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20190901-1.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20190901-1.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20190901-1.c b/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
new file mode 100644
index 00000000000..c78715ef2c1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
@@ -0,0 +1,36 @@
+/* PR target/91472 */
+/* Reported by John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> */
+
+typedef unsigned int gmp_uint_least32_t;
+
+union ieee_double_extract
+{
+ struct
+ {
+ gmp_uint_least32_t sig:1;
+ gmp_uint_least32_t exp:11;
+ gmp_uint_least32_t manh:20;
+ gmp_uint_least32_t manl:32;
+ } s;
+ double d;
+};
+
+double __attribute__((noipa))
+tests_infinity_d (void)
+{
+ union ieee_double_extract x;
+ x.s.exp = 2047;
+ x.s.manl = 0;
+ x.s.manh = 0;
+ x.s.sig = 0;
+ return x.d;
+}
+
+int
+main (void)
+{
+ double x = tests_infinity_d ();
+ if (x == 0.0)
+ __builtin_abort ();
+ return 0;
+}