diff options
author | David Billinghurst <David.Billinghurst@riotinto.com> | 2002-05-20 10:33:31 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2002-05-20 10:33:31 +0000 |
commit | b3f47c787cac7a101c40396a7c38faa64ad0bca6 (patch) | |
tree | 81607d7c5b3846ae6a97b42b830023737ac08b58 /gcc | |
parent | ecc42c14a7b3a9dd4b04c42b49f6da15e9c8cbf1 (diff) | |
download | gcc-b3f47c787cac7a101c40396a7c38faa64ad0bca6.zip gcc-b3f47c787cac7a101c40396a7c38faa64ad0bca6.tar.gz gcc-b3f47c787cac7a101c40396a7c38faa64ad0bca6.tar.bz2 |
* g++.dg/ext/oper1.C: New test.
From-SVN: r53657
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/oper1.C | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 811e1c4..435c713 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-05-19 Jason Merrill <jason2redhat.com> + + * g++.dg/ext/oper1.C: New test. + +2002-05-20 David Billinghurst <David.Billinghurst@riotinto.com> 2002-05-19 Mark Mitchell <mitchell@doubledemon.codesourcery.com> * README.QMTEST: New file. diff --git a/gcc/testsuite/g++.dg/ext/oper1.C b/gcc/testsuite/g++.dg/ext/oper1.C new file mode 100644 index 0000000..7f97d73 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/oper1.C @@ -0,0 +1,19 @@ +// { dg-do run } + +// Copyright 2002 Free Software Foundation +// Contributed by Jason Merrill <jason@redhat.com> + +// Make sure the GNU extension of accepting dropping cv-qualifiers for +// the implicit this argument does not kick in when taking the address +// of an object, since this extension would change the meaning of a +// well-defined program. + +struct A { + A* operator&() { return 0; } +}; + +int main () +{ + const A a = {}; + return (&a == 0); +} |