]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Thu, 10 Apr 2003 22:17:36 +0000 (22:17 +0000)
committerNo Author <no-author@gcc.gnu.org>
Thu, 10 Apr 2003 22:17:36 +0000 (22:17 +0000)
'gcc-3_2-branch'.

From-SVN: r65440

gcc/testsuite/g++.dg/opt/reload2.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/opt/reload2.C b/gcc/testsuite/g++.dg/opt/reload2.C
new file mode 100644 (file)
index 0000000..1af8aea
--- /dev/null
@@ -0,0 +1,42 @@
+// PR 10352
+// { dg-do compile }
+// { dg-options -O2 }
+
+extern double fabs(double x);
+
+typedef struct { float x, y; } S;
+typedef struct _T T;
+
+extern void fT( T *p );
+extern T *h();
+extern S g( );
+
+static
+int f(void)
+{
+    T *t=0;
+    int c=0;
+    S s;
+
+    const S exp_s = {0.,0.};
+
+    if(!(t = h()))
+    {
+        c++;
+    }
+
+    if(!c)
+    {
+        s = g();
+        if( (fabs( (s.x) - (exp_s.x) ) > 1 )
+            || (fabs( (s.y) - (exp_s.y) ) > 1 ) )
+        {
+            c++;
+        }
+    }
+
+    if(t)
+        fT(t);
+
+    return c;
+}