* gcc.c-torture/compile/20011217-2.c: New test.
authorAndreas Jaeger <aj@suse.de>
Mon, 17 Dec 2001 08:24:30 +0000 (09:24 +0100)
committerAndreas Jaeger <aj@gcc.gnu.org>
Mon, 17 Dec 2001 08:24:30 +0000 (09:24 +0100)
From-SVN: r48097

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20011217-2.c [new file with mode: 0644]

index 170ff3fe7737338d5f2bcb1a3635d8e5878a7b17..43bcac065a32e81674b3f645499fcb33c68e7618 100644 (file)
@@ -1,3 +1,7 @@
+2001-12-17  Andreas Jaeger  <aj@suse.de>
+
+       * gcc.c-torture/compile/20011217-2.c: New test.
+
 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * gcc.c-torture/compile/20011217-1.c: New test.
@@ -25,7 +29,7 @@ Thu Dec 13 10:35:33 2001  Nicola Pero  <n.pero@mi.flashnet.it>
        * objc/execute/bf-21.m: New test.
        * objc/execute/enumeration-1.m: New test.
        * objc/execute/enumeration-2.m: New test.
-       
+
 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc.dg/gnu89-init-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20011217-2.c b/gcc/testsuite/gcc.c-torture/compile/20011217-2.c
new file mode 100644 (file)
index 0000000..0d99359
--- /dev/null
@@ -0,0 +1,19 @@
+/* Test that the initializer of a compound literal is properly walked
+   when tree inlining.  */
+/* Origin: glibc (as reported in PR c/5105) from <aj@suse.de>.  */
+
+inline int
+finite (double __x)
+{
+  return (__extension__
+         (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1]
+            | 0x800fffffu) + 1) >> 31));
+}
+
+int
+main (void)
+{
+  double x = 1.0;
+  
+  return finite (x);
+}