From: David Billinghurst Date: Mon, 20 May 2002 10:33:31 +0000 (+0000) Subject: * g++.dg/ext/oper1.C: New test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3f47c787cac7a101c40396a7c38faa64ad0bca6;p=gcc.git * g++.dg/ext/oper1.C: New test. From-SVN: r53657 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 811e1c41c89..435c71339c1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-05-19 Jason Merrill + + * g++.dg/ext/oper1.C: New test. + +2002-05-20 David Billinghurst 2002-05-19 Mark Mitchell * 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 00000000000..7f97d73a8f5 --- /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 + +// 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); +}