summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNo Author <no-author@gcc.gnu.org>2003-04-10 22:17:36 +0000
committerNo Author <no-author@gcc.gnu.org>2003-04-10 22:17:36 +0000
commit73ae1804d5a04653067bdf612a48ab5f2babaa99 (patch)
treecf6c214fc91ed2ef783534ea43bea387da734030
parent069c20ea71d0426896206ead01ab4b78a9b8f2c2 (diff)
This commit was manufactured by cvs2svn to create branch
'gcc-3_2-branch'. From-SVN: r65440
-rw-r--r--gcc/testsuite/g++.dg/opt/reload2.C42
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/reload2.C b/gcc/testsuite/g++.dg/opt/reload2.C
new file mode 100644
index 00000000000..1af8aea6559
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/reload2.C
@@ -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;
+}