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
This commit is contained in:
parent
838d497079
commit
6af7ed0853
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue