diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/optimize2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/optimize2.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/optimize2.C b/gcc/testsuite/g++.old-deja/g++.jason/optimize2.C new file mode 100644 index 000000000..58b3b127f --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/optimize2.C @@ -0,0 +1,22 @@ +// { dg-do run } +// { dg-options "-w" } +// Used to crash on the alpha with optimization. + +extern "C" void abort (void); + +struct Fix { + unsigned short l; +}; + +static inline void f (int len) +{ + if (len > 65535) + abort (); +} + +struct Fix a = { 33 }; + +main() +{ + f (a.l); +} |