Commit 6af7ed08 by Ben Elliston Committed by Ben Elliston

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
parent 838d4970
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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment