From 2bb385d908387aa49242ae22bfe2e8ac23f61bea Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 19 Oct 2011 16:42:50 -0400 Subject: re PR c++/50787 (reference fails to bind directly to variable) PR c++/50787 * g++.dg/init/ref20.C: New. From-SVN: r180206 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/init/ref20.C | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 gcc/testsuite/g++.dg/init/ref20.C (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 098464a..4b5dc23 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-10-19 Jason Merrill + + PR c++/50787 + * g++.dg/init/ref20.C: New. + 2011-10-19 Kai Tietz PR middle-end/50795 diff --git a/gcc/testsuite/g++.dg/init/ref20.C b/gcc/testsuite/g++.dg/init/ref20.C new file mode 100644 index 0000000..b64cb57 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/ref20.C @@ -0,0 +1,8 @@ +// PR c++/50787 +// { dg-do run } + +int main() { + const int Ci = 0; + const int &rCi = Ci; + if (!(&Ci == &rCi)) __builtin_abort(); +} -- cgit v1.1