diff options
author | Ben Elliston <bje@au.ibm.com> | 2006-09-18 22:24:13 +0000 |
---|---|---|
committer | Ben Elliston <bje@gcc.gnu.org> | 2006-09-19 08:24:13 +1000 |
commit | 6af7ed0853685786992383cdaf9c864c7739a0ff (patch) | |
tree | d7267be9aceb5077a6d3e83cb0084585402903ed /gcc | |
parent | 838d4970791ec968ffcf28a2ddcd6e4b988b4c55 (diff) | |
download | gcc-6af7ed0853685786992383cdaf9c864c7739a0ff.zip gcc-6af7ed0853685786992383cdaf9c864c7739a0ff.tar.gz gcc-6af7ed0853685786992383cdaf9c864c7739a0ff.tar.bz2 |
const2.C (main): Examine p to prevent an optimising linker from discarding it.
* g++.old-deja/g++.pt/const2.C (main): Examine p to prevent an
optimising linker from discarding it.
From-SVN: r117039
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/const2.C | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 73889e0..9f26625 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-09-19 Ben Elliston <bje@au.ibm.com> + + * g++.old-deja/g++.pt/const2.C (main): Examine p to prevent an + optimising linker from discarding it. + 2006-09-18 Paul Thomas <pault@gcc.gnu.org> PR fortran/28526 diff --git a/gcc/testsuite/g++.old-deja/g++.pt/const2.C b/gcc/testsuite/g++.old-deja/g++.pt/const2.C index 1e63ca5..cb0e2c7 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/const2.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/const2.C @@ -6,4 +6,8 @@ template <class T> struct B { static const int i = 3; }; template <class T> struct A { static const int i = B<T>::i; }; const int *p = &A<int>::i; -int main(){} +int main () +{ + // Examine p to prevent optimising linkers from discarding it. + return (p != 0); +} |