diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-10 22:16:06 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-10 22:16:06 +0000 |
| commit | 08763bac15dc6dd838c4110e8f262b2a4f16e36d (patch) | |
| tree | 6e058d34d8b554d7ad0bbe549bda86535333fe20 | |
| parent | 2ff313d1dc13970c0448e55fbcf53185e9795fb1 (diff) | |
| download | ppe42-gcc-08763bac15dc6dd838c4110e8f262b2a4f16e36d.tar.gz ppe42-gcc-08763bac15dc6dd838c4110e8f262b2a4f16e36d.zip | |
New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65439 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/testsuite/g++.dg/opt/reload2.C | 42 |
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; +} |

