diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-10 20:07:50 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-10 20:07:50 +0000 |
commit | 0091de3c2b5a7dcca2e3774c5ec1f3d92e988ebb (patch) | |
tree | 8f5d713bed3e3e3ffdce3d1ec3c8c4e6792024be /gcc/testsuite | |
parent | f5cfa40206ef61cecab14e624f380e4cbbf7c0de (diff) | |
download | gcc-0091de3c2b5a7dcca2e3774c5ec1f3d92e988ebb.tar.gz |
2010-12-10 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 167697
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@167699 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
239 files changed, 2700 insertions, 389 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 96275ed6d29..7bb46f3a7b5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,342 @@ +2010-12-10 Sebastian Pop <sebastian.pop@amd.com> + + PR tree-optimization/43023 + * gfortran.dg/ldist-1.f90: Adjust pattern. + * gfortran.dg/ldist-pr43023.f90: New. + +2010-12-10 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/46804 + * gfortran.dg/pr46804.f90: New test. + +2010-12-10 Dave Korn <dave.korn.cygwin@gmail.com> + + PR middle-end/46674 + PR lto/43157 + * gcc.dg/pr43157.c: New file. + +2010-12-10 Nathan Froyd <froydnj@codesourcery.com> + + * gcc.dg/dfp/struct-union.c: Adjust. + * gcc.dg/lvalue-2.c: Adjust. + * gcc.dg/pr21419.c: Adjust. + * gcc.dg/qual-component-1.c: Adjust. + * g++.dg/other/const1.C: Adjust. + +2010-12-10 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/46865 + * gcc.target/i386/pr46865-1.c: New test. + * gcc.target/i386/pr46865-2.c: New test. + + PR tree-optimization/46864 + * g++.dg/opt/pr46864.C: New test. + +2010-12-10 Jack Howarth <howarth@bromo.med.uc.edu> + Iain Sandoe <iains@gcc.gnu.org> + + PR 43751/target + * lib/prune.exp: Prune dsymutil warnings. + +2010-12-10 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc.dg/class-extension-1.m: New. + * objc.dg/class-extension-2.m: New. + * objc.dg/class-extension-3.m: New. + * objc.dg/property/at-property-26.m: New. + * objc.dg/property/at-property-27.m: New. + * objc.dg/property/at-property-28.m: New. + * obj-c++.dg/class-extension-1.mm: New. + * obj-c++.dg/class-extension-2.mm: New. + * obj-c++.dg/class-extension-3.mm: New. + * obj-c++.dg/property/at-property-26.mm: New. + * obj-c++.dg/property/at-property-27.mm: New. + * obj-c++.dg/property/at-property-28.mm: New. + +2010-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR target/46057 + * gcc.dg/torture/stackalign/nested-1.c: Skip on hppa*-*-hpux*. + * gcc.dg/torture/stackalign/vararg-1.c: Likewise. + * gcc.dg/torture/stackalign/nested-2.c: Likewise. + * gcc.dg/torture/stackalign/vararg-2.c: Likewise. + * gcc.dg/torture/stackalign/nested-3.c: Likewise. + * gcc.dg/torture/stackalign/nested-4.c: Likewise. + * gcc.dg/torture/stackalign/global-1.c: Likewise. + * gcc.dg/torture/stackalign/ret-struct-1.c: Likewise. + * gcc.dg/torture/stackalign/inline-1.c: Likewise. + * gcc.dg/torture/stackalign/inline-2.c: Likewise. + * gcc.dg/torture/stackalign/struct-1.c: Likewise. + * gcc.dg/torture/stackalign/pr16660-1.c: Likewise. + * gcc.dg/torture/stackalign/alloca-1.c: Likewise. + * g++.dg/torture/stackalign/throw-1.C: Likewise. + * g++.dg/torture/stackalign/throw-2.C: Likewise. + * g++.dg/torture/stackalign/throw-4.C: Likewise. + * g++.dg/torture/stackalign/eh-inline-1.C: Likewise. + * g++.dg/torture/stackalign/eh-inline-2.C: Likewise. + * g++.dg/torture/stackalign/eh-vararg-1.C: Likewise. + * g++.dg/torture/stackalign/eh-vararg-2.C: Likewise. + * g++.dg/torture/stackalign/eh-alloca-1.C: Likewise. + * g++.dg/torture/stackalign/eh-global-1.C: Likewise. + + PR tree-optimization/46021 + gcc.dg/tree-ssa/20040204-1.c: Remove XFAIL for hppa*-*.*. + +2010-12-09 Richard Guenther <rguenther@suse.de> + + PR middle-end/46844 + * gcc.c-torture/compile/pr46866.c: New testcase. + +2010-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR testsuite/45068 + * g++.dg/debug/dwarf2/nested-2.C: Also match comments starting with ';'. + +2010-12-09 Martin Jambor <mjambor@suse.cz> + + PR middle-end/46734 + * g++.dg/tree-ssa/pr46734.C: New test. + +2010-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR c++/44641 + * lib/scanasm.exp (dg-function-on-line): Add match pattern for + hppa*-*-*. + +2010-12-08 Jason Merrill <jason@redhat.com> + + PR c++/46348 + * g++.dg/cpp0x/constexpr-array2.C: New. + +2010-12-08 H.J. Lu <hongjiu.lu@intel.com> + + * gcc.target/i386/sse2-init-v2di-2.c: Add "-dp" and update + expected scan. + +2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc.dg/exceptions-7.m: New. + * obj-c++.dg/exceptions-7.mm: New. + * obj-c++.dg/exceptions-3.mm: Adjust for new C++ messages. + * obj-c++.dg/exceptions-5.mm: Same change. + +2010-12-08 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc.dg/foreach-6.m: Updated location of error messages. + * objc.dg/foreach-7.m: Same change. + +2010-12-08 Richard Guenther <rguenther@suse.de> + Sebastian Pop <sebastian.pop@amd.com> + + PR tree-optimization/45230 + PR tree-optimization/45231 + PR tree-optimization/45370 + * gcc.dg/graphite/id-pr45230-1.c: New. + * gcc.dg/graphite/id-pr45231.c: New. + * gfortran.dg/graphite/id-pr45370.f90: New. + +2010-12-08 Nathan Froyd <froydnj@codesourcery.com> + + PR c++/45329 + * testsuite/g++.dg/conversion/ambig1.C: Adjust. + * testsuite/g++.dg/conversion/op1.C: Adjust. + * testsuite/g++.dg/conversion/simd1.C: Adjust. + * testsuite/g++.dg/cpp0x/defaulted14.C: Adjust. + * testsuite/g++.dg/cpp0x/defaulted18.C: Adjust. + * testsuite/g++.dg/cpp0x/defaulted20.C: Adjust. + * testsuite/g++.dg/cpp0x/explicit3.C: Adjust. + * testsuite/g++.dg/cpp0x/explicit4.C: Adjust. + * testsuite/g++.dg/cpp0x/implicit4.C: Adjust. + * testsuite/g++.dg/cpp0x/nullptr15.C: Adjust. + * testsuite/g++.dg/cpp0x/nullptr19.C: Adjust. + * testsuite/g++.dg/cpp0x/pr31431-2.C: Adjust. + * testsuite/g++.dg/cpp0x/pr31431.C: Adjust. + * testsuite/g++.dg/cpp0x/pr31434.C: Adjust. + * testsuite/g++.dg/cpp0x/pr31437.C: Adjust. + * testsuite/g++.dg/cpp0x/rv2n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv3n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv4n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv5n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv6n.C: Adjust. + * testsuite/g++.dg/cpp0x/rv7n.C: Adjust. + * testsuite/g++.dg/cpp0x/temp_default2.C: Adjust. + * testsuite/g++.dg/cpp0x/trailing4.C: Adjust. + * testsuite/g++.dg/cpp0x/variadic-ex3.C: Adjust. + * testsuite/g++.dg/cpp0x/variadic-ex4.C: Adjust. + * testsuite/g++.dg/cpp0x/variadic35.C: Adjust. + * testsuite/g++.dg/cpp0x/vt-35147.C: Adjust. + * testsuite/g++.dg/cpp0x/vt-37737-2.C: Adjust. + * testsuite/g++.dg/expr/cond9.C: Adjust. + * testsuite/g++.dg/expr/pmf-1.C: Adjust. + * testsuite/g++.dg/ext/label5.C: Adjust. + * testsuite/g++.dg/ext/visibility/anon8.C: Adjust. + * testsuite/g++.dg/ext/vla2.C: Adjust. + * testsuite/g++.dg/gomp/pr26690-1.C: Adjust. + * testsuite/g++.dg/gomp/pr26690-2.C: Adjust. + * testsuite/g++.dg/init/synth2.C: Adjust. + * testsuite/g++.dg/lookup/conv-1.C: Adjust. + * testsuite/g++.dg/lookup/new1.C: Adjust. + * testsuite/g++.dg/lookup/using9.C: Adjust. + * testsuite/g++.dg/other/error13.C: Adjust. + * testsuite/g++.dg/other/error20.C: Adjust. + * testsuite/g++.dg/other/error31.C: Adjust. + * testsuite/g++.dg/other/pr28114.C: Adjust. + * testsuite/g++.dg/other/ptrmem10.C: Adjust. + * testsuite/g++.dg/other/ptrmem11.C: Adjust. + * testsuite/g++.dg/overload/ambig1.C: Adjust. + * testsuite/g++.dg/overload/arg3.C: Adjust. + * testsuite/g++.dg/overload/builtin1.C: Adjust. + * testsuite/g++.dg/overload/copy1.C: Adjust. + * testsuite/g++.dg/overload/new1.C: Adjust. + * testsuite/g++.dg/overload/template4.C: Adjust. + * testsuite/g++.dg/overload/unknown1.C: Adjust. + * testsuite/g++.dg/overload/using2.C: Adjust. + * testsuite/g++.dg/parse/crash5.C: Adjust. + * testsuite/g++.dg/parse/error19.C: Adjust. + * testsuite/g++.dg/parse/error28.C: Adjust. + * testsuite/g++.dg/parse/template7.C: Adjust. + * testsuite/g++.dg/parse/typename7.C: Adjust. + * testsuite/g++.dg/rtti/typeid6.C: Adjust. + * testsuite/g++.dg/tc1/dr152.C: Adjust. + * testsuite/g++.dg/template/conv11.C: Adjust. + * testsuite/g++.dg/template/copy1.C: Adjust. + * testsuite/g++.dg/template/crash37.C: Adjust. + * testsuite/g++.dg/template/deduce3.C: Adjust. + * testsuite/g++.dg/template/dependent-expr5.C: Adjust. + * testsuite/g++.dg/template/error38.C: Adjust. + * testsuite/g++.dg/template/error40.C: Adjust. + * testsuite/g++.dg/template/friend.C: Adjust. + * testsuite/g++.dg/template/incomplete2.C: Adjust. + * testsuite/g++.dg/template/instantiate5.C: Adjust. + * testsuite/g++.dg/template/local4.C: Adjust. + * testsuite/g++.dg/template/local6.C: Adjust. + * testsuite/g++.dg/template/new3.C: Adjust. + * testsuite/g++.dg/template/operator9.C: Adjust. + * testsuite/g++.dg/template/overload6.C: Adjust. + * testsuite/g++.dg/template/ptrmem2.C: Adjust. + * testsuite/g++.dg/template/ptrmem20.C: Adjust. + * testsuite/g++.dg/template/ptrmem4.C: Adjust. + * testsuite/g++.dg/template/ptrmem8.C: Adjust. + * testsuite/g++.dg/template/qualttp5.C: Adjust. + * testsuite/g++.dg/template/sfinae2.C: Adjust. + * testsuite/g++.dg/template/spec22.C: Adjust. + * testsuite/g++.dg/template/spec23.C: Adjust. + * testsuite/g++.dg/template/ttp25.C: Adjust. + * testsuite/g++.dg/template/typedef4.C: Adjust. + * testsuite/g++.dg/template/unify10.C: Adjust. + * testsuite/g++.dg/template/unify11.C: Adjust. + * testsuite/g++.dg/template/unify6.C: Adjust. + * testsuite/g++.dg/template/unify7.C: Adjust. + * testsuite/g++.dg/template/unify9.C: Adjust. + * testsuite/g++.dg/template/varmod1.C: Adjust. + * testsuite/g++.old-deja/g++.benjamin/15799.C: Adjust. + * testsuite/g++.old-deja/g++.benjamin/15800-1.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/ambiguity1.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/crash29.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/crash48.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/crash56.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/cvt3.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/overload1.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/overload4.C: Adjust. + * testsuite/g++.old-deja/g++.brendan/overload9.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900127_01.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900205_04.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900330_02.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900404_03.C: Adjust. + * testsuite/g++.old-deja/g++.bugs/900514_03.C: Adjust. + * testsuite/g++.old-deja/g++.eh/ctor1.C: Adjust. + * testsuite/g++.old-deja/g++.jason/conversion11.C: Adjust. + * testsuite/g++.old-deja/g++.jason/crash3.C: Adjust. + * testsuite/g++.old-deja/g++.jason/overload16.C: Adjust. + * testsuite/g++.old-deja/g++.jason/overload28.C: Adjust. + * testsuite/g++.old-deja/g++.jason/scoping10.C: Adjust. + * testsuite/g++.old-deja/g++.jason/template30.C: Adjust. + * testsuite/g++.old-deja/g++.jason/temporary2.C: Adjust. + * testsuite/g++.old-deja/g++.law/arg1.C: Adjust. + * testsuite/g++.old-deja/g++.law/arg11.C: Adjust. + * testsuite/g++.old-deja/g++.law/arm9.C: Adjust. + * testsuite/g++.old-deja/g++.law/ctors11.C: Adjust. + * testsuite/g++.old-deja/g++.law/ctors17.C: Adjust. + * testsuite/g++.old-deja/g++.law/ctors5.C: Adjust. + * testsuite/g++.old-deja/g++.law/ctors9.C: Adjust. + * testsuite/g++.old-deja/g++.law/enum4.C: Adjust. + * testsuite/g++.old-deja/g++.law/missed-error2.C: Adjust. + * testsuite/g++.old-deja/g++.law/operators32.C: Adjust. + * testsuite/g++.old-deja/g++.law/operators9.C: Adjust. + * testsuite/g++.old-deja/g++.mike/net2.C: Adjust. + * testsuite/g++.old-deja/g++.mike/net22.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p11110.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p1989.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p2431.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p438.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p807a.C: Adjust. + * testsuite/g++.old-deja/g++.mike/p9068.C: Adjust. + * testsuite/g++.old-deja/g++.niklas/t120.C: Adjust. + * testsuite/g++.old-deja/g++.niklas/t121.C: Adjust. + * testsuite/g++.old-deja/g++.niklas/t128.C: Adjust. + * testsuite/g++.old-deja/g++.ns/overload2.C: Adjust. + * testsuite/g++.old-deja/g++.ns/using12.C: Adjust. + * testsuite/g++.old-deja/g++.other/crash24.C: Adjust. + * testsuite/g++.old-deja/g++.other/expr1.C: Adjust. + * testsuite/g++.old-deja/g++.other/overload11.C: Adjust. + * testsuite/g++.old-deja/g++.other/pmf3.C: Adjust. + * testsuite/g++.old-deja/g++.other/volatile1.C: Adjust. + * testsuite/g++.old-deja/g++.pt/auto_ptr.C: Adjust. + * testsuite/g++.old-deja/g++.pt/crash28.C: Adjust. + * testsuite/g++.old-deja/g++.pt/crash60.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit38.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit39.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit41.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit67.C: Adjust. + * testsuite/g++.old-deja/g++.pt/explicit77.C: Adjust. + * testsuite/g++.old-deja/g++.pt/expr2.C: Adjust. + * testsuite/g++.old-deja/g++.pt/ptrmem10.C: Adjust. + * testsuite/g++.old-deja/g++.pt/ptrmem6.C: Adjust. + * testsuite/g++.old-deja/g++.pt/spec35.C: Adjust. + * testsuite/g++.old-deja/g++.pt/spec5.C: Adjust. + * testsuite/g++.old-deja/g++.pt/spec6.C: Adjust. + * testsuite/g++.old-deja/g++.pt/t05.C: Adjust. + * testsuite/g++.old-deja/g++.pt/t24.C: Adjust. + * testsuite/g++.old-deja/g++.pt/unify4.C: Adjust. + * testsuite/g++.old-deja/g++.pt/unify6.C: Adjust. + * testsuite/g++.old-deja/g++.pt/unify8.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb109.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb119.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb131.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb22.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb69.C: Adjust. + * testsuite/g++.old-deja/g++.robertl/eb98.C: Adjust. + +2010-12-08 Jason Merrill <jason@redhat.com> + + PR c++/45822 + * g++.dg/init/synth4.C: New. + + PR c++/46736 + * g++.dg/cpp0x/defaulted21.C: New. + +2010-12-08 Wei Guozhi <carrot@google.com> + + PR target/46631 + * gcc.target/arm/pr46631: New testcase. + +2010-12-08 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR middle-end/42694 + * gcc.target/powerpc/ppc-pow.c: New file to make sure pow (x, + 0.75) is not optimized if the machine has no sqrt instruction. + +2010-12-07 Andrey Belevantsev <abel@ispras.ru> + + PR target/43603 + * gcc.target/ia64/pr43603.c: New. + * gcc/testsuite/g++.dg/opt/pr46640.C: New. + +2010-12-07 Tobias Burnus <burnus@net-b.de> + + PR fortran/44352 + * gfortran.dg/string_4.f90: New. + 2010-12-07 Sebastian Pop <sebastian.pop@amd.com> PR tree-optimization/44676 diff --git a/gcc/testsuite/g++.dg/conversion/ambig1.C b/gcc/testsuite/g++.dg/conversion/ambig1.C index 1db1667073f..85ea1d25f9e 100644 --- a/gcc/testsuite/g++.dg/conversion/ambig1.C +++ b/gcc/testsuite/g++.dg/conversion/ambig1.C @@ -6,3 +6,4 @@ struct H { }; int const& ref = H(); // { dg-error "ambiguous" } +// { dg-message "candidate" "candidate note" { target *-*-* } 8 } diff --git a/gcc/testsuite/g++.dg/conversion/op1.C b/gcc/testsuite/g++.dg/conversion/op1.C index 65b925a4d61..e0a3e5f46ed 100644 --- a/gcc/testsuite/g++.dg/conversion/op1.C +++ b/gcc/testsuite/g++.dg/conversion/op1.C @@ -1,10 +1,11 @@ class C { template<typename U> - operator U(); // { dg-message "candidate" } + operator U(); // { dg-message "note" } }; int fn (C c) { return C::operator float(c); // { dg-error "operator float.C" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.dg/conversion/simd1.C b/gcc/testsuite/g++.dg/conversion/simd1.C index 56be6f47ca9..fa40b0eaad2 100644 --- a/gcc/testsuite/g++.dg/conversion/simd1.C +++ b/gcc/testsuite/g++.dg/conversion/simd1.C @@ -5,8 +5,8 @@ #define vector __attribute__((vector_size(16))) -vector signed int vld (int a1, const vector signed int *a2) { return *a2; } /* { dg-message "vld" } */ -vector signed short vld (int a1, const vector signed short *a2) { return *a2; } /* { dg-message "vld" } */ +vector signed int vld (int a1, const vector signed int *a2) { return *a2; } /* { dg-message "vld|no known conversion" } */ +vector signed short vld (int a1, const vector signed short *a2) { return *a2; } /* { dg-message "vld|no known conversion" } */ extern int i; extern vector signed short vss; @@ -17,6 +17,7 @@ extern const vector signed short *cvssp; void foo () { vss = vld(i, vscp); /* { dg-error "no matching function for call" } */ + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } vss = vld(i, vssp); vss = vld(i, cvssp); } diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array2.C new file mode 100644 index 00000000000..9577f75d9fd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array2.C @@ -0,0 +1,19 @@ +// PR c++/46348 +// { dg-options -std=c++0x } + +template<__SIZE_TYPE__ _Nw> + struct _Base + { + typedef unsigned long _WordT; + + _WordT _M_w[_Nw]; + + constexpr + _Base() + : _M_w() { } + }; + +int main() +{ + _Base<256> bs; +} diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted14.C b/gcc/testsuite/g++.dg/cpp0x/defaulted14.C index 235e646780a..e476d576cfa 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted14.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted14.C @@ -14,5 +14,7 @@ int main() { A a; a = B(); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } a = 1.0; // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted18.C b/gcc/testsuite/g++.dg/cpp0x/defaulted18.C index ae055e3bc63..559dfde4833 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted18.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted18.C @@ -6,4 +6,5 @@ void f(int i, ...); // { dg-message "void f" } int main() { f(1,1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted20.C b/gcc/testsuite/g++.dg/cpp0x/defaulted20.C index d9ad04fec4e..5d536a97eff 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted20.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted20.C @@ -2,12 +2,13 @@ // { dg-options -std=c++0x } struct A { - A(A&&) = default; // { dg-message "A::A" } + A(A&&) = default; // { dg-message "A::A|no known conversion" } }; struct B { const A a; B(const B&) = default; B(B&&) = default; // { dg-error "implicitly deleted|no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } }; void g(B); // { dg-error "argument 1" } diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted21.C b/gcc/testsuite/g++.dg/cpp0x/defaulted21.C new file mode 100644 index 00000000000..3e740331d8a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted21.C @@ -0,0 +1,20 @@ +// PR c++/46736 +// { dg-options -std=c++0x } + +struct U { + U(); + U(U const&); +}; + +struct X { + U const u; + X(); + X(X&&); +}; + +X::X(X&&)=default; // { dg-error "implicitly deleted" } +// { dg-error "does not have a move constructor" "" { target *-*-* } 15 } + +X f() { + return X(); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit3.C b/gcc/testsuite/g++.dg/cpp0x/explicit3.C index cd37a155eed..be0a14e7adf 100644 --- a/gcc/testsuite/g++.dg/cpp0x/explicit3.C +++ b/gcc/testsuite/g++.dg/cpp0x/explicit3.C @@ -42,6 +42,7 @@ int main() // These do not. switch (a); // { dg-error "" } bool b = a; // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 44 } f(a); // { dg-error "" } B b2 = { a }; // { dg-error "" } a + true; // { dg-message "" } diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit4.C b/gcc/testsuite/g++.dg/cpp0x/explicit4.C index 67c60f67928..0f3bc623a53 100644 --- a/gcc/testsuite/g++.dg/cpp0x/explicit4.C +++ b/gcc/testsuite/g++.dg/cpp0x/explicit4.C @@ -2,7 +2,7 @@ // { dg-options "-std=c++0x" } struct A { - A(const A&, int = 0); // { dg-message "candidate" } + A(const A&, int = 0); // { dg-message "note" } }; struct B { @@ -14,4 +14,5 @@ int main() B b; (A(b)); // OK (A(b,1)); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit4.C b/gcc/testsuite/g++.dg/cpp0x/implicit4.C index 75606a3ce7e..f97eb7549f9 100644 --- a/gcc/testsuite/g++.dg/cpp0x/implicit4.C +++ b/gcc/testsuite/g++.dg/cpp0x/implicit4.C @@ -4,11 +4,12 @@ struct A { - A(); // { dg-message "A::A" } - A(A&&); // { dg-message "A::A" } + A(); // { dg-message "A::A|candidate expects" } + A(A&&); // { dg-message "A::A|no known conversion" } }; struct B: A // { dg-error "implicit|no match" } +// { dg-message "candidate" "candidate note" { target *-*-* } 11 } { }; diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C index 67d9d4a2311..e02fd5592eb 100644 --- a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C @@ -10,15 +10,17 @@ template <typename T, typename U> inline typename tType_equal<T, U>::type type_equal(U) { } -template<typename T> T* g( T* t ); // { dg-message "candidate" } +template<typename T> T* g( T* t ); // { dg-message "note" } void test_g() { // Deduction to nullptr_t, no deduction to pointer type // g(nullptr); // { dg-error "no matching function for call to " } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } type_equal<float*>(g((float*)nullptr)); decltype(nullptr) mynull = 0; g(mynull); // { dg-error "no matching function for call to " } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } type_equal<float*>(g((float*)mynull)); } diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr19.C b/gcc/testsuite/g++.dg/cpp0x/nullptr19.C index 7eb00bb3f7e..cf30f1c2396 100644 --- a/gcc/testsuite/g++.dg/cpp0x/nullptr19.C +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr19.C @@ -11,5 +11,7 @@ nullptr_t k( nullptr_t ); /* { dg-message "note" } { dg-message "note" } */ void test_k() { k(0); /* { dg-error "is ambiguous" } */ + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } k(__null); /* { dg-error "is ambiguous" } */ + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C index 59e1afeab25..15efbc5d359 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C @@ -1,7 +1,8 @@ // { dg-options "-std=gnu++0x" } -template<typename, typename..., typename> void foo(); // { dg-message "candidate" } +template<typename, typename..., typename> void foo(); // { dg-message "note" } void bar() { foo<int>(); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431.C b/gcc/testsuite/g++.dg/cpp0x/pr31431.C index b150a047f8c..36f341f3d02 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31431.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31431.C @@ -1,7 +1,8 @@ // { dg-options "-std=gnu++0x" } -template<typename..., typename> void foo(); // { dg-message "candidate" } +template<typename..., typename> void foo(); // { dg-message "note" } void bar() { foo<int>(); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31434.C b/gcc/testsuite/g++.dg/cpp0x/pr31434.C index a785ae934a6..97ad079ab0b 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31434.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31434.C @@ -8,4 +8,5 @@ template<typename... T> int foo(const T&) // { dg-error "not expanded with|T" } void bar() { foo(0); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31437.C b/gcc/testsuite/g++.dg/cpp0x/pr31437.C index 812c695f4ec..0b64f7273fb 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31437.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31437.C @@ -7,3 +7,4 @@ template <typename... T> struct A // { dg-error "candidates|A" } }; A<int> a(0); // { dg-error "no matching" } +// { dg-message "candidate" "candidate note" { target *-*-* } 9 } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv2n.C b/gcc/testsuite/g++.dg/cpp0x/rv2n.C index a5c51778e34..2b3a9c06ae9 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv2n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv2n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 2 at a time -one sink_2_12( A&); // { dg-message "candidates|argument" } +one sink_2_12( A&); // { dg-message "note|argument" } two sink_2_12(const A&); // { dg-message "note|argument" } int test2_12() @@ -40,13 +40,17 @@ int test2_12() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_12(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 42 } sink_2_12(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 44 } sink_2_12(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 46 } sink_2_12(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 48 } return 0; } -one sink_2_13( A&); // { dg-message "candidates|argument" } +one sink_2_13( A&); // { dg-message "note|argument" } three sink_2_13(volatile A&); // { dg-message "note|argument" } int test2_13() @@ -56,15 +60,21 @@ int test2_13() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_13(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 62 } sink_2_13(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 64 } sink_2_13(source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } sink_2_13(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 68 } sink_2_13(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 70 } sink_2_13(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 72 } return 0; } -one sink_2_14( A&); // { dg-message "candidates|argument" } +one sink_2_14( A&); // { dg-message "note|argument" } four sink_2_14(const volatile A&); // { dg-message "note|argument" } int test2_14() @@ -74,13 +84,17 @@ int test2_14() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_14(source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 86 } sink_2_14(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 88 } sink_2_14(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 90 } sink_2_14(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 92 } return 0; } -one sink_2_15( A&); // { dg-message "candidates|argument" } +one sink_2_15( A&); // { dg-message "note|argument" } five sink_2_15( A&&); // { dg-message "note|argument" } int test2_15() @@ -90,15 +104,21 @@ int test2_15() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_15(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 106 } sink_2_15(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 108 } sink_2_15(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 110 } sink_2_15(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 112 } sink_2_15(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 114 } sink_2_15(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 116 } return 0; } -one sink_2_16( A&); // { dg-message "candidates|argument" } +one sink_2_16( A&); // { dg-message "note|argument" } six sink_2_16(const A&&); // { dg-message "note|argument" } int test2_16() @@ -109,13 +129,17 @@ int test2_16() const volatile A cva = a; // { dg-error "lvalue" } sink_2_16(ca); // { dg-error "lvalue" } sink_2_16(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 131 } sink_2_16(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 133 } sink_2_16(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 135 } sink_2_16(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 137 } return 0; } -one sink_2_17( A&); // { dg-message "candidates|argument" } +one sink_2_17( A&); // { dg-message "note|argument" } seven sink_2_17(volatile A&&); // { dg-message "note|argument" } int test2_17() @@ -125,10 +149,14 @@ int test2_17() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_17(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 151 } sink_2_17(va); // { dg-error "lvalue" } sink_2_17(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 154 } sink_2_17(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 156 } sink_2_17(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 158 } return 0; } @@ -146,7 +174,7 @@ int test2_18() sink_2_18(cva); // { dg-error "lvalue" } } -two sink_2_23(const A&); // { dg-message "candidates|argument" } +two sink_2_23(const A&); // { dg-message "note|argument" } three sink_2_23(volatile A&); // { dg-message "note|argument" } int test2_23() @@ -156,13 +184,17 @@ int test2_23() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_23(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 186 } sink_2_23(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 188 } sink_2_23(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 190 } sink_2_23(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 192 } return 0; } -two sink_2_24(const A&); // { dg-message "candidates|argument" } +two sink_2_24(const A&); // { dg-message "note|argument" } four sink_2_24(const volatile A&); // { dg-message "note|argument" } int test2_24() @@ -172,11 +204,13 @@ int test2_24() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_24(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 206 } sink_2_24(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 208 } return 0; } -three sink_2_34(volatile A&); // { dg-message "candidate" } +three sink_2_34(volatile A&); // { dg-message "three sink_2_34|no known conversion" } four sink_2_34(const volatile A&); // { dg-message "note|argument" } int test2_34() @@ -186,13 +220,17 @@ int test2_34() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_34(source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 222 } sink_2_34(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 224 } sink_2_34(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 226 } sink_2_34(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 228 } return 0; } -two sink_2_25(const A&); // { dg-message "candidate" } +two sink_2_25(const A&); // { dg-message "two sink_2_25|no known conversion" } five sink_2_25( A&&); // { dg-message "note|argument" } int test2_25() @@ -202,13 +240,17 @@ int test2_25() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_25(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 242 } sink_2_25(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 244 } sink_2_25(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 246 } sink_2_25(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 248 } return 0; } -two sink_2_26(const A&); // { dg-message "candidate" } +two sink_2_26(const A&); // { dg-message "two sink_2_26|no known conversion" } six sink_2_26(const A&&); // { dg-message "note|argument" } int test2_26() @@ -218,13 +260,17 @@ int test2_26() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_26(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 262 } sink_2_26(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 264 } sink_2_26(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 266 } sink_2_26(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 268 } return 0; } -two sink_2_27(const A&); // { dg-message "candidate" } +two sink_2_27(const A&); // { dg-message "two sink_2_27|no known conversion" } seven sink_2_27(volatile A&&); // { dg-message "note|argument" } int test2_27() @@ -235,7 +281,9 @@ int test2_27() const volatile A cva = a; // { dg-error "lvalue" } sink_2_27(va); // { dg-error "lvalue" } sink_2_27(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 283 } sink_2_27(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 285 } return 0; } @@ -252,7 +300,7 @@ int test2_28() sink_2_28(cva); // { dg-error "lvalue" } } -three sink_2_35(volatile A&); // { dg-message "candidate" } +three sink_2_35(volatile A&); // { dg-message "three sink_2_35|no known conversion" } five sink_2_35( A&&); // { dg-message "note|argument" } int test2_35() @@ -262,14 +310,19 @@ int test2_35() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_35(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 312 } sink_2_35(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 314 } sink_2_35(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 316 } sink_2_35(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 318 } sink_2_35(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 320 } return 0; } -three sink_2_36(volatile A&); // { dg-message "candidate" } +three sink_2_36(volatile A&); // { dg-message "three sink_2_36|no known conversion" } six sink_2_36(const A&&); // { dg-message "note|argument" } int test2_36() @@ -280,12 +333,15 @@ int test2_36() const volatile A cva = a; // { dg-error "lvalue" } sink_2_36(ca); // { dg-error "lvalue" } sink_2_36(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 335 } sink_2_36(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 337 } sink_2_36(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 339 } return 0; } -three sink_2_37(volatile A&); // { dg-message "candidate" } +three sink_2_37(volatile A&); // { dg-message "three sink_2_37|no known conversion" } seven sink_2_37(volatile A&&); // { dg-message "note|argument" } int test2_37() @@ -295,9 +351,13 @@ int test2_37() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_37(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 353 } sink_2_37(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 355 } sink_2_37(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 357 } sink_2_37(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 359 } return 0; } @@ -314,7 +374,7 @@ int test2_38() sink_2_38(cva); // { dg-error "lvalue" } } -four sink_2_45(const volatile A&); // { dg-message "candidate" } +four sink_2_45(const volatile A&); // { dg-message "note" } five sink_2_45( A&&); // { dg-message "note|argument" } int test2_45() @@ -324,12 +384,15 @@ int test2_45() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_45(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 386 } sink_2_45(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 388 } sink_2_45(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 390 } return 0; } -four sink_2_46(const volatile A&); // { dg-message "candidate" } +four sink_2_46(const volatile A&); // { dg-message "note" } six sink_2_46(const A&&); // { dg-message "note|argument" } int test2_46() @@ -339,11 +402,13 @@ int test2_46() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_46(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 404 } sink_2_46(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 406 } return 0; } -four sink_2_47(const volatile A&); // { dg-message "candidate" } +four sink_2_47(const volatile A&); // { dg-message "note" } seven sink_2_47(volatile A&&); // { dg-message "note|argument" } int test2_47() @@ -353,11 +418,13 @@ int test2_47() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_47(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 420 } sink_2_47(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 422 } return 0; } -five sink_2_56( A&&); // { dg-message "candidate|argument" } +five sink_2_56( A&&); // { dg-message "note|argument" } six sink_2_56(const A&&); // { dg-message "note|argument" } int test2_56() @@ -369,13 +436,17 @@ int test2_56() sink_2_56(a); // { dg-error "lvalue" } sink_2_56(ca); // { dg-error "lvalue" } sink_2_56(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 438 } sink_2_56(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 440 } sink_2_56(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 442 } sink_2_56(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 444 } return 0; } -five sink_2_57( A&&); // { dg-message "candidate|argument" } +five sink_2_57( A&&); // { dg-message "note|argument" } seven sink_2_57(volatile A&&); // { dg-message "note|argument" } int test2_57() @@ -387,9 +458,13 @@ int test2_57() sink_2_57(a); // { dg-error "lvalue" } sink_2_57(va); // { dg-error "lvalue" } sink_2_57(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 460 } sink_2_57(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 462 } sink_2_57(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 464 } sink_2_57(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 466 } return 0; } @@ -408,7 +483,7 @@ int test2_58() sink_2_58(cva); // { dg-error "lvalue" } } -six sink_2_67(const A&&); // { dg-message "candidate|argument" } +six sink_2_67(const A&&); // { dg-message "note|argument" } seven sink_2_67(volatile A&&); // { dg-message "note|argument" } int test2_67() @@ -418,11 +493,15 @@ int test2_67() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_2_67(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 495 } sink_2_67(ca); // { dg-error "lvalue" } sink_2_67(va); // { dg-error "lvalue" } sink_2_67(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 499 } sink_2_67(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 501 } sink_2_67(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 503 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv3n.C b/gcc/testsuite/g++.dg/cpp0x/rv3n.C index cacbdb395e7..637716f9b44 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv3n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv3n.C @@ -30,9 +30,9 @@ const volatile A cv_source(); // 3 at a time -one sink_3_123( A&); // { dg-message "candidates" } -two sink_3_123(const A&); // { dg-message "note" } -three sink_3_123(volatile A&); // { dg-message "note" } +one sink_3_123( A&); // { dg-message "one sink_3_123|no known conversion" } +two sink_3_123(const A&); // { dg-message "two sink_3_123|no known conversion" } +three sink_3_123(volatile A&); // { dg-message "three sink_3_123|no known conversion" } int test3_123() { @@ -41,18 +41,21 @@ int test3_123() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_123(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 43 } sink_3_123(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 45 } sink_3_123(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } return 0; } -one sink_3_125( A&); // { dg-message "candidates" } -two sink_3_125(const A&); // { dg-message "note" } -five sink_3_125( A&&); // { dg-message "note" } +one sink_3_125( A&); // { dg-message "one sink_3_125|no known conversion" } +two sink_3_125(const A&); // { dg-message "two sink_3_125|no known conversion" } +five sink_3_125( A&&); // { dg-message "five sink_3_125|no known conversion" } -one sink_3_124( A&); // { dg-message "candidates" } -two sink_3_124(const A&); // { dg-message "note" } -four sink_3_124(const volatile A&); // { dg-message "note" } +one sink_3_124( A&); // { dg-message "one sink_3_124|no known conversion" } +two sink_3_124(const A&); // { dg-message "two sink_3_124|no known conversion" } +four sink_3_124(const volatile A&); // { dg-message "four sink_3_124|no known conversion" } int test3_124() { @@ -61,7 +64,9 @@ int test3_124() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_124(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } sink_3_124(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 68 } return 0; } @@ -72,15 +77,19 @@ int test3_125() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_125(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 79 } sink_3_125(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 81 } sink_3_125(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 83 } sink_3_125(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 85 } return 0; } -one sink_3_126( A&); // { dg-message "candidates" } -two sink_3_126(const A&); // { dg-message "note" } -six sink_3_126(const A&&); // { dg-message "note" } +one sink_3_126( A&); // { dg-message "one sink_3_126|no known conversion" } +two sink_3_126(const A&); // { dg-message "two sink_3_126|no known conversion" } +six sink_3_126(const A&&); // { dg-message "six sink_3_126|no known conversion" } int test3_126() { @@ -89,15 +98,19 @@ int test3_126() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_126(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 100 } sink_3_126(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 102 } sink_3_126(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 104 } sink_3_126(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 106 } return 0; } -one sink_3_127( A&); // { dg-message "candidates" } -two sink_3_127(const A&); // { dg-message "note" } -seven sink_3_127(volatile A&&); // { dg-message "" } +one sink_3_127( A&); // { dg-message "one sink_3_127|no known conversion" } +two sink_3_127(const A&); // { dg-message "two sink_3_127|no known conversion" } +seven sink_3_127(volatile A&&); // { dg-message "seven sink_3_127|no known conversion" } int test3_127() { @@ -107,7 +120,9 @@ int test3_127() const volatile A cva = a; // { dg-error "lvalue" } sink_3_127(va); // { dg-error "lvalue" } sink_3_127(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 122 } sink_3_127(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 124 } return 0; } @@ -126,9 +141,9 @@ int test3_128() sink_3_128(cva); // { dg-error "lvalue" } } -one sink_3_134( A&); // { dg-message "candidates" } -three sink_3_134(volatile A&); // { dg-message "note" } -four sink_3_134(const volatile A&); // { dg-message "note" } +one sink_3_134( A&); // { dg-message "one sink_3_134|no known conversion" } +three sink_3_134(volatile A&); // { dg-message "three sink_3_134|no known conversion" } +four sink_3_134(const volatile A&); // { dg-message "four sink_3_134|no known conversion" } int test3_134() { @@ -137,15 +152,19 @@ int test3_134() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_134(source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 154 } sink_3_134(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 156 } sink_3_134(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 158 } sink_3_134(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 160 } return 0; } -one sink_3_135( A&); // { dg-message "candidates" } -three sink_3_135(volatile A&); // { dg-message "note" } -five sink_3_135( A&&); // { dg-message "note" } +one sink_3_135( A&); // { dg-message "one sink_3_135|no known conversion" } +three sink_3_135(volatile A&); // { dg-message "three sink_3_135|no known conversion" } +five sink_3_135( A&&); // { dg-message "five sink_3_135|no known conversion" } int test3_135() { @@ -154,14 +173,19 @@ int test3_135() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_135(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 175 } sink_3_135(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 177 } sink_3_135(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 179 } sink_3_135(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 181 } sink_3_135(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 183 } return 0; } -one sink_3_136( A&); // { dg-message "candidates" } +one sink_3_136( A&); // { dg-message "one sink_3_136|no known conversion" } three sink_3_136(volatile A&); // { dg-message "note" } six sink_3_136(const A&&); // { dg-message "" } @@ -173,12 +197,15 @@ int test3_136() const volatile A cva = a; // { dg-error "lvalue" } sink_3_136(ca); // { dg-error "lvalue" } sink_3_136(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 199 } sink_3_136(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 201 } sink_3_136(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 203 } return 0; } -one sink_3_137( A&); // { dg-message "candidates" } +one sink_3_137( A&); // { dg-message "one sink_3_137|no known conversion" } three sink_3_137(volatile A&); // { dg-message "note" } seven sink_3_137(volatile A&&); // { dg-message "note" } @@ -189,9 +216,13 @@ int test3_137() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_137(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 218 } sink_3_137(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 220 } sink_3_137(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 222 } sink_3_137(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 224 } return 0; } @@ -210,7 +241,7 @@ int test3_138() return 0; } -one sink_3_145( A&); // { dg-message "candidates" } +one sink_3_145( A&); // { dg-message "one sink_3_145|no known conversion" } four sink_3_145(const volatile A&); // { dg-message "note" } five sink_3_145( A&&); // { dg-message "note" } @@ -221,12 +252,15 @@ int test3_145() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_145(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 254 } sink_3_145(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 256 } sink_3_145(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 258 } return 0; } -one sink_3_146( A&); // { dg-message "candidates" } +one sink_3_146( A&); // { dg-message "one sink_3_146|no known conversion" } four sink_3_146(const volatile A&); // { dg-message "note" } six sink_3_146(const A&&); // { dg-message "note" } @@ -237,11 +271,13 @@ int test3_146() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_146(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 273 } sink_3_146(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 275 } return 0; } -one sink_3_147( A&); // { dg-message "candidates" } +one sink_3_147( A&); // { dg-message "one sink_3_147|no known conversion" } four sink_3_147(const volatile A&); // { dg-message "note" } seven sink_3_147(volatile A&&); // { dg-message "note" } @@ -252,11 +288,13 @@ int test3_147() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_147(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 290 } sink_3_147(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 292 } return 0; } -one sink_3_156( A&); // { dg-message "candidates" } +one sink_3_156( A&); // { dg-message "one sink_3_156|no known conversion" } five sink_3_156( A&&); // { dg-message "note" } six sink_3_156(const A&&); // { dg-message "" } @@ -268,13 +306,17 @@ int test3_156() const volatile A cva = a; // { dg-error "lvalue" } sink_3_156(ca); // { dg-error "lvalue" } sink_3_156(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 308 } sink_3_156(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 310 } sink_3_156(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 312 } sink_3_156(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 314 } return 0; } -one sink_3_157( A&); // { dg-message "candidates" } +one sink_3_157( A&); // { dg-message "one sink_3_157|no known conversion" } five sink_3_157( A&&); // { dg-message "note" } seven sink_3_157(volatile A&&); // { dg-message "" } @@ -285,10 +327,14 @@ int test3_157() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_157(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 329 } sink_3_157(va); // { dg-error "lvalue" } sink_3_157(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 332 } sink_3_157(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 334 } sink_3_157(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 336 } return 0; } @@ -308,7 +354,7 @@ int test3_158() return 0; } -one sink_3_167( A&); // { dg-message "candidates" } +one sink_3_167( A&); // { dg-message "one sink_3_167|no known conversion" } six sink_3_167(const A&&); // { dg-message "" } seven sink_3_167(volatile A&&); // { dg-message "" } @@ -321,8 +367,11 @@ int test3_167() sink_3_167(ca); // { dg-error "lvalue" } sink_3_167(va); // { dg-error "lvalue" } sink_3_167(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 369 } sink_3_167(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 371 } sink_3_167(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 373 } return 0; } @@ -358,7 +407,7 @@ int test3_178() return 0; } -two sink_3_234(const A&); // { dg-message "candidates" } +two sink_3_234(const A&); // { dg-message "two sink_3_234|no known conversion" } three sink_3_234(volatile A&); // { dg-message "note" } four sink_3_234(const volatile A&); // { dg-message "note" } @@ -369,12 +418,15 @@ int test3_234() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_234(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 420 } sink_3_234(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 422 } sink_3_234(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 424 } return 0; } -two sink_3_235(const A&); // { dg-message "candidates" } +two sink_3_235(const A&); // { dg-message "two sink_3_235|no known conversion" } three sink_3_235(volatile A&); // { dg-message "note" } five sink_3_235( A&&); // { dg-message "note" } @@ -385,13 +437,17 @@ int test3_235() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_235(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 439 } sink_3_235(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 441 } sink_3_235(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 443 } sink_3_235(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 445 } return 0; } -two sink_3_236(const A&); // { dg-message "candidates" } +two sink_3_236(const A&); // { dg-message "two sink_3_236|no known conversion" } three sink_3_236(volatile A&); // { dg-message "note" } six sink_3_236(const A&&); // { dg-message "note" } @@ -402,13 +458,17 @@ int test3_236() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_236(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 460 } sink_3_236(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 462 } sink_3_236(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 464 } sink_3_236(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 466 } return 0; } -two sink_3_237(const A&); // { dg-message "candidates" } +two sink_3_237(const A&); // { dg-message "two sink_3_237|no known conversion" } three sink_3_237(volatile A&); // { dg-message "note" } seven sink_3_237(volatile A&&); // { dg-message "note" } @@ -419,14 +479,17 @@ int test3_237() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_237(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 481 } sink_3_237(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 483 } sink_3_237(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 485 } return 0; } -two sink_3_238(const A&); // { dg-message "candidates" } -three sink_3_238(volatile A&); // { dg-message "note" } -eight sink_3_238(const volatile A&&); // { dg-message "" } +two sink_3_238(const A&); // { dg-message "two sink_3_238|no known conversion" } +three sink_3_238(volatile A&); // { dg-message "three sink_3_238|no known conversion" } +eight sink_3_238(const volatile A&&); // { dg-message "eight sink_3_238|no known conversion" } int test3_238() { @@ -435,13 +498,14 @@ int test3_238() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_238(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 500 } sink_3_238(cva); // { dg-error "lvalue" } return 0; } -two sink_3_245(const A&); // { dg-message "candidates" } -four sink_3_245(const volatile A&); // { dg-message "note" } -five sink_3_245( A&&); // { dg-message "note" } +two sink_3_245(const A&); // { dg-message "two sink_3_245|no known conversion" } +four sink_3_245(const volatile A&); // { dg-message "four sink_3_245|no known conversion" } +five sink_3_245( A&&); // { dg-message "five sink_3_245|no known conversion" } int test3_245() { @@ -450,13 +514,15 @@ int test3_245() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_245(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 516 } sink_3_245(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 518 } return 0; } -two sink_3_246(const A&); // { dg-message "candidates" } -four sink_3_246(const volatile A&); // { dg-message "note" } -six sink_3_246(const A&&); // { dg-message "note" } +two sink_3_246(const A&); // { dg-message "two sink_3_246|no known conversion" } +four sink_3_246(const volatile A&); // { dg-message "four sink_3_246|no known conversion" } +six sink_3_246(const A&&); // { dg-message "six sink_3_246|no known conversion" } int test3_246() { @@ -465,13 +531,15 @@ int test3_246() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_246(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 533 } sink_3_246(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 535 } return 0; } -two sink_3_247(const A&); // { dg-message "candidates" } -four sink_3_247(const volatile A&); // { dg-message "note" } -seven sink_3_247(volatile A&&); // { dg-message "note" } +two sink_3_247(const A&); // { dg-message "two sink_3_247|no known conversion" } +four sink_3_247(const volatile A&); // { dg-message "four sink_3_247|no known conversion" } +seven sink_3_247(volatile A&&); // { dg-message "seven sink_3_247|no known conversion" } int test3_247() { @@ -480,12 +548,13 @@ int test3_247() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_247(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 550 } return 0; } -two sink_3_256(const A&); // { dg-message "candidates" } -five sink_3_256( A&&); // { dg-message "note" } -six sink_3_256(const A&&); // { dg-message "note" } +two sink_3_256(const A&); // { dg-message "two sink_3_256|no known conversion" } +five sink_3_256( A&&); // { dg-message "five sink_3_256|no known conversion" } +six sink_3_256(const A&&); // { dg-message "six sink_3_256|no known conversion" } int test3_256() { @@ -494,15 +563,19 @@ int test3_256() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_256(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 565 } sink_3_256(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 567 } sink_3_256(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 569 } sink_3_256(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 571 } return 0; } -two sink_3_257(const A&); // { dg-message "candidates" } -five sink_3_257( A&&); // { dg-message "note" } -seven sink_3_257(volatile A&&); // { dg-message "" } +two sink_3_257(const A&); // { dg-message "two sink_3_257|no known conversion" } +five sink_3_257( A&&); // { dg-message "five sink_3_257|no known conversion" } +seven sink_3_257(volatile A&&); // { dg-message "seven sink_3_257|no known conversion" } int test3_257() { @@ -512,7 +585,9 @@ int test3_257() const volatile A cva = a; // { dg-error "lvalue" } sink_3_257(va); // { dg-error "lvalue" } sink_3_257(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 587 } sink_3_257(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 589 } return 0; } @@ -531,9 +606,9 @@ int test3_258() return 0; } -two sink_3_267(const A&); // { dg-message "candidates" } -six sink_3_267(const A&&); // { dg-message "note" } -seven sink_3_267(volatile A&&); // { dg-message "" } +two sink_3_267(const A&); // { dg-message "two sink_3_267|no known conversion" } +six sink_3_267(const A&&); // { dg-message "six sink_3_267|no known conversion" } +seven sink_3_267(volatile A&&); // { dg-message "seven sink_3_267|no known conversion" } int test3_267() { @@ -543,8 +618,11 @@ int test3_267() const volatile A cva = a; // { dg-error "lvalue" } sink_3_267(va); // { dg-error "lvalue" } sink_3_267(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 620 } sink_3_267(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 622 } sink_3_267(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 624 } return 0; } @@ -578,9 +656,9 @@ int test3_278() return 0; } -three sink_3_345(volatile A&); // { dg-message "candidates" } -four sink_3_345(const volatile A&); // { dg-message "note" } -five sink_3_345( A&&); // { dg-message "note" } +three sink_3_345(volatile A&); // { dg-message "three sink_3_345|no known conversion" } +four sink_3_345(const volatile A&); // { dg-message "four sink_3_345|no known conversion" } +five sink_3_345( A&&); // { dg-message "five sink_3_345|no known conversion" } int test3_345() { @@ -589,14 +667,17 @@ int test3_345() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_345(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 669 } sink_3_345(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 671 } sink_3_345(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 673 } return 0; } -three sink_3_346(volatile A&); // { dg-message "candidates" } -four sink_3_346(const volatile A&); // { dg-message "note" } -six sink_3_346(const A&&); // { dg-message "note" } +three sink_3_346(volatile A&); // { dg-message "three sink_3_346|no known conversion" } +four sink_3_346(const volatile A&); // { dg-message "four sink_3_346|no known conversion" } +six sink_3_346(const A&&); // { dg-message "six sink_3_346|no known conversion" } int test3_346() { @@ -605,13 +686,15 @@ int test3_346() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_346(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 688 } sink_3_346(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 690 } return 0; } -three sink_3_347(volatile A&); // { dg-message "candidates" } -four sink_3_347(const volatile A&); // { dg-message "note" } -seven sink_3_347(volatile A&&); // { dg-message "note" } +three sink_3_347(volatile A&); // { dg-message "three sink_3_347|no known conversion" } +four sink_3_347(const volatile A&); // { dg-message "four sink_3_347|no known conversion" } +seven sink_3_347(volatile A&&); // { dg-message "seven sink_3_347|no known conversion" } int test3_347() { @@ -620,13 +703,15 @@ int test3_347() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_347(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 705 } sink_3_347(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 707 } return 0; } -three sink_3_356(volatile A&); // { dg-message "candidates" } -five sink_3_356( A&&); // { dg-message "note" } -six sink_3_356(const A&&); // { dg-message "" } +three sink_3_356(volatile A&); // { dg-message "three sink_3_356|no known conversion" } +five sink_3_356( A&&); // { dg-message "five sink_3_356|no known conversion" } +six sink_3_356(const A&&); // { dg-message "six sink_3_356|no known conversion" } int test3_356() { @@ -636,14 +721,17 @@ int test3_356() const volatile A cva = a; // { dg-error "lvalue" } sink_3_356(ca); // { dg-error "lvalue" } sink_3_356(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 723 } sink_3_356(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 725 } sink_3_356(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 727 } return 0; } -three sink_3_357(volatile A&); // { dg-message "candidates" } -five sink_3_357( A&&); // { dg-message "note" } -seven sink_3_357(volatile A&&); // { dg-message "note" } +three sink_3_357(volatile A&); // { dg-message "three sink_3_357|no known conversion" } +five sink_3_357( A&&); // { dg-message "five sink_3_357|no known conversion" } +seven sink_3_357(volatile A&&); // { dg-message "seven sink_3_357|no known conversion" } int test3_357() { @@ -652,9 +740,13 @@ int test3_357() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_357(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 742 } sink_3_357(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 744 } sink_3_357(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 746 } sink_3_357(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 748 } return 0; } @@ -673,9 +765,9 @@ int test3_358() return 0; } -three sink_3_367(volatile A&); // { dg-message "candidates" } -six sink_3_367(const A&&); // { dg-message "" } -seven sink_3_367(volatile A&&); // { dg-message "note" } +three sink_3_367(volatile A&); // { dg-message "three sink_3_367|no known conversion" } +six sink_3_367(const A&&); // { dg-message "six sink_3_367|no known conversion" } +seven sink_3_367(volatile A&&); // { dg-message "seven sink_3_367|no known conversion" } int test3_367() { @@ -685,8 +777,11 @@ int test3_367() const volatile A cva = a; // { dg-error "lvalue" } sink_3_367(ca); // { dg-error "lvalue" } sink_3_367(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 779 } sink_3_367(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 781 } sink_3_367(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 783 } return 0; } @@ -720,7 +815,7 @@ int test3_378() return 0; } -four sink_3_456(const volatile A&); // { dg-message "candidates" } +four sink_3_456(const volatile A&); // { dg-message "note" } five sink_3_456( A&&); // { dg-message "note" } six sink_3_456(const A&&); // { dg-message "note" } @@ -731,11 +826,13 @@ int test3_456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 828 } sink_3_456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 830 } return 0; } -four sink_3_457(const volatile A&); // { dg-message "candidates" } +four sink_3_457(const volatile A&); // { dg-message "note" } five sink_3_457( A&&); // { dg-message "note" } seven sink_3_457(volatile A&&); // { dg-message "note" } @@ -746,11 +843,13 @@ int test3_457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_457(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 845 } sink_3_457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 847 } return 0; } -four sink_3_467(const volatile A&); // { dg-message "candidates" } +four sink_3_467(const volatile A&); // { dg-message "note" } six sink_3_467(const A&&); // { dg-message "note" } seven sink_3_467(volatile A&&); // { dg-message "note" } @@ -761,13 +860,15 @@ int test3_467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 862 } sink_3_467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 864 } return 0; } -five sink_3_567( A&&); // { dg-message "" } -six sink_3_567(const A&&); // { dg-message "" } -seven sink_3_567(volatile A&&); // { dg-message "" } +five sink_3_567( A&&); // { dg-message "five sink_3_567|no known conversion" } +six sink_3_567(const A&&); // { dg-message "six sink_3_567|no known conversion" } +seven sink_3_567(volatile A&&); // { dg-message "seven sink_3_567|no known conversion" } int test3_567() { @@ -779,7 +880,9 @@ int test3_567() sink_3_567(ca); // { dg-error "lvalue" } sink_3_567(va); // { dg-error "lvalue" } sink_3_567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 882 } sink_3_567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 884 } return 0; } @@ -817,9 +920,9 @@ int test3_578() return 0; } -six sink_3_678(const A&&); // { dg-message "" } -seven sink_3_678(volatile A&&); // { dg-message "" } -eight sink_3_678(const volatile A&&); // { dg-message "" } +six sink_3_678(const A&&); // { dg-message "six sink_3_678|no known conversion" } +seven sink_3_678(volatile A&&); // { dg-message "seven sink_3_678|no known conversion" } +eight sink_3_678(const volatile A&&); // { dg-message "eight sink_3_678|no known conversion" } int test3_678() { @@ -828,10 +931,12 @@ int test3_678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_3_678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 933 } sink_3_678(ca); // { dg-error "lvalue" } sink_3_678(va); // { dg-error "lvalue" } sink_3_678(cva); // { dg-error "lvalue" } sink_3_678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 938 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv4n.C b/gcc/testsuite/g++.dg/cpp0x/rv4n.C index 524885f1d60..daff3079851 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv4n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv4n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 4 at a time -one sink_4_1234( A&); // { dg-message "candidates" } +one sink_4_1234( A&); // { dg-message "one sink_4_1234|no known conversion" } two sink_4_1234(const A&); // { dg-message "note" } three sink_4_1234(volatile A&); // { dg-message "note" } four sink_4_1234(const volatile A&); // { dg-message "note" } @@ -42,11 +42,13 @@ int test4_1234() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1234(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 44 } sink_4_1234(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 46 } return 0; } -one sink_4_1235( A&); // { dg-message "candidates" } +one sink_4_1235( A&); // { dg-message "one sink_4_1235|no known conversion" } two sink_4_1235(const A&); // { dg-message "note" } three sink_4_1235(volatile A&); // { dg-message "note" } five sink_4_1235( A&&); // { dg-message "note" } @@ -58,12 +60,15 @@ int test4_1235() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1235(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 62 } sink_4_1235(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 64 } sink_4_1235(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } return 0; } -one sink_4_1236( A&); // { dg-message "candidates" } +one sink_4_1236( A&); // { dg-message "one sink_4_1236|no known conversion" } two sink_4_1236(const A&); // { dg-message "note" } three sink_4_1236(volatile A&); // { dg-message "note" } six sink_4_1236(const A&&); // { dg-message "note" } @@ -75,12 +80,15 @@ int test4_1236() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1236(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 82 } sink_4_1236(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 84 } sink_4_1236(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 86 } return 0; } -one sink_4_1237( A&); // { dg-message "candidates" } +one sink_4_1237( A&); // { dg-message "one sink_4_1237|no known conversion" } two sink_4_1237(const A&); // { dg-message "note" } three sink_4_1237(volatile A&); // { dg-message "note" } seven sink_4_1237(volatile A&&); // { dg-message "note" } @@ -92,7 +100,9 @@ int test4_1237() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1237(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 102 } sink_4_1237(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 104 } return 0; } @@ -111,7 +121,7 @@ int test4_1238() return 0; } -one sink_4_1245( A&); // { dg-message "candidates" } +one sink_4_1245( A&); // { dg-message "one sink_4_1245|no known conversion" } two sink_4_1245(const A&); // { dg-message "note" } four sink_4_1245(const volatile A&); // { dg-message "note" } five sink_4_1245( A&&); // { dg-message "note" } @@ -123,11 +133,13 @@ int test4_1245() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1245(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 135 } sink_4_1245(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 137 } return 0; } -one sink_4_1246( A&); // { dg-message "candidates" } +one sink_4_1246( A&); // { dg-message "one sink_4_1246|no known conversion" } two sink_4_1246(const A&); // { dg-message "note" } four sink_4_1246(const volatile A&); // { dg-message "note" } six sink_4_1246(const A&&); // { dg-message "note" } @@ -139,11 +151,13 @@ int test4_1246() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1246(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 153 } sink_4_1246(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 155 } return 0; } -one sink_4_1247( A&); // { dg-message "candidates" } +one sink_4_1247( A&); // { dg-message "one sink_4_1247|no known conversion" } two sink_4_1247(const A&); // { dg-message "note" } four sink_4_1247(const volatile A&); // { dg-message "note" } seven sink_4_1247(volatile A&&); // { dg-message "note" } @@ -155,10 +169,11 @@ int test4_1247() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1247(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 171 } return 0; } -one sink_4_1256( A&); // { dg-message "candidates" } +one sink_4_1256( A&); // { dg-message "one sink_4_1256|no known conversion" } two sink_4_1256(const A&); // { dg-message "note" } five sink_4_1256( A&&); // { dg-message "note" } six sink_4_1256(const A&&); // { dg-message "note" } @@ -170,13 +185,17 @@ int test4_1256() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1256(va); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 187 } sink_4_1256(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 189 } sink_4_1256(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 191 } sink_4_1256(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 193 } return 0; } -one sink_4_1257( A&); // { dg-message "candidates" } +one sink_4_1257( A&); // { dg-message "one sink_4_1257|no known conversion" } two sink_4_1257(const A&); // { dg-message "note" } five sink_4_1257( A&&); // { dg-message "note" } seven sink_4_1257(volatile A&&); // { dg-message "" } @@ -189,7 +208,9 @@ int test4_1257() const volatile A cva = a; // { dg-error "lvalue" } sink_4_1257(va); // { dg-error "lvalue" } sink_4_1257(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 210 } sink_4_1257(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 212 } return 0; } @@ -209,7 +230,7 @@ int test4_1258() return 0; } -one sink_4_1267( A&); // { dg-message "candidates" } +one sink_4_1267( A&); // { dg-message "one sink_4_1267|no known conversion" } two sink_4_1267(const A&); // { dg-message "note" } six sink_4_1267(const A&&); // { dg-message "note" } seven sink_4_1267(volatile A&&); // { dg-message "" } @@ -222,8 +243,11 @@ int test4_1267() const volatile A cva = a; // { dg-error "lvalue" } sink_4_1267(va); // { dg-error "lvalue" } sink_4_1267(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 245 } sink_4_1267(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 247 } sink_4_1267(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 249 } return 0; } @@ -259,7 +283,7 @@ int test4_1278() return 0; } -one sink_4_1345( A&); // { dg-message "candidates" } +one sink_4_1345( A&); // { dg-message "one sink_4_1345|no known conversion" } three sink_4_1345(volatile A&); // { dg-message "note" } four sink_4_1345(const volatile A&); // { dg-message "note" } five sink_4_1345( A&&); // { dg-message "note" } @@ -271,12 +295,15 @@ int test4_1345() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1345(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 297 } sink_4_1345(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 299 } sink_4_1345(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 301 } return 0; } -one sink_4_1346( A&); // { dg-message "candidates" } +one sink_4_1346( A&); // { dg-message "one sink_4_1346|no known conversion" } three sink_4_1346(volatile A&); // { dg-message "note" } four sink_4_1346(const volatile A&); // { dg-message "note" } six sink_4_1346(const A&&); // { dg-message "note" } @@ -288,11 +315,13 @@ int test4_1346() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1346(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 317 } sink_4_1346(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 319 } return 0; } -one sink_4_1347( A&); // { dg-message "candidates" } +one sink_4_1347( A&); // { dg-message "one sink_4_1347|no known conversion" } three sink_4_1347(volatile A&); // { dg-message "note" } four sink_4_1347(const volatile A&); // { dg-message "note" } seven sink_4_1347(volatile A&&); // { dg-message "note" } @@ -304,11 +333,13 @@ int test4_1347() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1347(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 335 } sink_4_1347(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 337 } return 0; } -one sink_4_1356( A&); // { dg-message "candidates" } +one sink_4_1356( A&); // { dg-message "one sink_4_1356|no known conversion" } three sink_4_1356(volatile A&); // { dg-message "note" } five sink_4_1356( A&&); // { dg-message "note" } six sink_4_1356(const A&&); // { dg-message "" } @@ -321,12 +352,15 @@ int test4_1356() const volatile A cva = a; // { dg-error "lvalue" } sink_4_1356(ca); // { dg-error "lvalue" } sink_4_1356(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 354 } sink_4_1356(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 356 } sink_4_1356(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 358 } return 0; } -one sink_4_1357( A&); // { dg-message "candidates" } +one sink_4_1357( A&); // { dg-message "one sink_4_1357|no known conversion" } three sink_4_1357(volatile A&); // { dg-message "note" } five sink_4_1357( A&&); // { dg-message "note" } seven sink_4_1357(volatile A&&); // { dg-message "note" } @@ -338,9 +372,13 @@ int test4_1357() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1357(ca); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 374 } sink_4_1357(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 376 } sink_4_1357(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 378 } sink_4_1357(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 380 } return 0; } @@ -360,7 +398,7 @@ int test4_1358() return 0; } -one sink_4_1367( A&); // { dg-message "candidates" } +one sink_4_1367( A&); // { dg-message "one sink_4_1367|no known conversion" } three sink_4_1367(volatile A&); // { dg-message "note" } six sink_4_1367(const A&&); // { dg-message "" } seven sink_4_1367(volatile A&&); // { dg-message "note" } @@ -373,8 +411,11 @@ int test4_1367() const volatile A cva = a; // { dg-error "lvalue" } sink_4_1367(ca); // { dg-error "lvalue" } sink_4_1367(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 413 } sink_4_1367(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 415 } sink_4_1367(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 417 } return 0; } @@ -410,7 +451,7 @@ int test4_1378() return 0; } -one sink_4_1456( A&); // { dg-message "candidates" } +one sink_4_1456( A&); // { dg-message "one sink_4_1456|no known conversion" } four sink_4_1456(const volatile A&); // { dg-message "note" } five sink_4_1456( A&&); // { dg-message "note" } six sink_4_1456(const A&&); // { dg-message "note" } @@ -422,11 +463,13 @@ int test4_1456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 465 } sink_4_1456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 467 } return 0; } -one sink_4_1457( A&); // { dg-message "candidates" } +one sink_4_1457( A&); // { dg-message "one sink_4_1457|no known conversion" } four sink_4_1457(const volatile A&); // { dg-message "note" } five sink_4_1457( A&&); // { dg-message "note" } seven sink_4_1457(volatile A&&); // { dg-message "note" } @@ -438,11 +481,13 @@ int test4_1457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1457(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 483 } sink_4_1457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 485 } return 0; } -one sink_4_1467( A&); // { dg-message "candidates" } +one sink_4_1467( A&); // { dg-message "one sink_4_1467|no known conversion" } four sink_4_1467(const volatile A&); // { dg-message "note" } six sink_4_1467(const A&&); // { dg-message "note" } seven sink_4_1467(volatile A&&); // { dg-message "note" } @@ -454,11 +499,13 @@ int test4_1467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_1467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 501 } sink_4_1467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 503 } return 0; } -one sink_4_1567( A&); // { dg-message "candidates" } +one sink_4_1567( A&); // { dg-message "one sink_4_1567|no known conversion" } five sink_4_1567( A&&); // { dg-message "note" } six sink_4_1567(const A&&); // { dg-message "" } seven sink_4_1567(volatile A&&); // { dg-message "" } @@ -472,7 +519,9 @@ int test4_1567() sink_4_1567(ca); // { dg-error "lvalue" } sink_4_1567(va); // { dg-error "lvalue" } sink_4_1567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 521 } sink_4_1567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 523 } return 0; } @@ -525,10 +574,11 @@ int test4_1678() sink_4_1678(va); // { dg-error "lvalue" } sink_4_1678(cva); // { dg-error "lvalue" } sink_4_1678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 576 } return 0; } -two sink_4_2345(const A&); // { dg-message "candidates" } +two sink_4_2345(const A&); // { dg-message "two sink_4_2345|no known conversion" } three sink_4_2345(volatile A&); // { dg-message "note" } four sink_4_2345(const volatile A&); // { dg-message "note" } five sink_4_2345( A&&); // { dg-message "note" } @@ -540,12 +590,15 @@ int test4_2345() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2345(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 592 } sink_4_2345(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 594 } sink_4_2345(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 596 } return 0; } -two sink_4_2346(const A&); // { dg-message "candidates" } +two sink_4_2346(const A&); // { dg-message "two sink_4_2346|no known conversion" } three sink_4_2346(volatile A&); // { dg-message "note" } four sink_4_2346(const volatile A&); // { dg-message "note" } six sink_4_2346(const A&&); // { dg-message "note" } @@ -557,12 +610,15 @@ int test4_2346() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2346(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 612 } sink_4_2346(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 614 } sink_4_2346(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 616 } return 0; } -two sink_4_2347(const A&); // { dg-message "candidates" } +two sink_4_2347(const A&); // { dg-message "two sink_4_2347|no known conversion" } three sink_4_2347(volatile A&); // { dg-message "note" } four sink_4_2347(const volatile A&); // { dg-message "note" } seven sink_4_2347(volatile A&&); // { dg-message "note" } @@ -574,11 +630,13 @@ int test4_2347() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2347(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 632 } sink_4_2347(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 634 } return 0; } -two sink_4_2348(const A&); // { dg-message "candidates" } +two sink_4_2348(const A&); // { dg-message "note" } three sink_4_2348(volatile A&); // { dg-message "note" } four sink_4_2348(const volatile A&); // { dg-message "note" } eight sink_4_2348(const volatile A&&); // { dg-message "note" } @@ -590,10 +648,11 @@ int test4_2348() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2348(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 650 } return 0; } -two sink_4_2356(const A&); // { dg-message "candidates" } +two sink_4_2356(const A&); // { dg-message "two sink_4_2356|no known conversion" } three sink_4_2356(volatile A&); // { dg-message "note" } five sink_4_2356( A&&); // { dg-message "note" } six sink_4_2356(const A&&); // { dg-message "note" } @@ -605,13 +664,17 @@ int test4_2356() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2356(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 666 } sink_4_2356(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 668 } sink_4_2356(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 670 } sink_4_2356(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 672 } return 0; } -two sink_4_2357(const A&); // { dg-message "candidates" } +two sink_4_2357(const A&); // { dg-message "two sink_4_2357|no known conversion" } three sink_4_2357(volatile A&); // { dg-message "note" } five sink_4_2357( A&&); // { dg-message "note" } seven sink_4_2357(volatile A&&); // { dg-message "note" } @@ -623,12 +686,15 @@ int test4_2357() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2357(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 688 } sink_4_2357(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 690 } sink_4_2357(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 692 } return 0; } -two sink_4_2358(const A&); // { dg-message "candidates" } +two sink_4_2358(const A&); // { dg-message "note" } three sink_4_2358(volatile A&); // { dg-message "note" } five sink_4_2358( A&&); // { dg-message "note" } eight sink_4_2358(const volatile A&&); // { dg-message "" } @@ -640,11 +706,12 @@ int test4_2358() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2358(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 708 } sink_4_2358(cva); // { dg-error "lvalue" } return 0; } -two sink_4_2367(const A&); // { dg-message "candidates" } +two sink_4_2367(const A&); // { dg-message "two sink_4_2367|no known conversion" } three sink_4_2367(volatile A&); // { dg-message "note" } six sink_4_2367(const A&&); // { dg-message "note" } seven sink_4_2367(volatile A&&); // { dg-message "note" } @@ -656,13 +723,17 @@ int test4_2367() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2367(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 725 } sink_4_2367(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 727 } sink_4_2367(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 729 } sink_4_2367(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 731 } return 0; } -two sink_4_2368(const A&); // { dg-message "candidates" } +two sink_4_2368(const A&); // { dg-message "note" } three sink_4_2368(volatile A&); // { dg-message "note" } six sink_4_2368(const A&&); // { dg-message "note" } eight sink_4_2368(const volatile A&&); // { dg-message "" } @@ -674,11 +745,12 @@ int test4_2368() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2368(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 747 } sink_4_2368(cva); // { dg-error "lvalue" } return 0; } -two sink_4_2378(const A&); // { dg-message "candidates" } +two sink_4_2378(const A&); // { dg-message "note" } three sink_4_2378(volatile A&); // { dg-message "note" } seven sink_4_2378(volatile A&&); // { dg-message "note" } eight sink_4_2378(const volatile A&&); // { dg-message "" } @@ -690,11 +762,12 @@ int test4_2378() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2378(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 764 } sink_4_2378(cva); // { dg-error "lvalue" } return 0; } -two sink_4_2456(const A&); // { dg-message "candidates" } +two sink_4_2456(const A&); // { dg-message "two sink_4_2456|no known conversion" } four sink_4_2456(const volatile A&); // { dg-message "note" } five sink_4_2456( A&&); // { dg-message "note" } six sink_4_2456(const A&&); // { dg-message "note" } @@ -706,11 +779,13 @@ int test4_2456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 781 } sink_4_2456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 783 } return 0; } -two sink_4_2457(const A&); // { dg-message "candidates" } +two sink_4_2457(const A&); // { dg-message "two sink_4_2457|no known conversion" } four sink_4_2457(const volatile A&); // { dg-message "note" } five sink_4_2457( A&&); // { dg-message "note" } seven sink_4_2457(volatile A&&); // { dg-message "note" } @@ -722,10 +797,11 @@ int test4_2457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 799 } return 0; } -two sink_4_2467(const A&); // { dg-message "candidates" } +two sink_4_2467(const A&); // { dg-message "two sink_4_2467|no known conversion" } four sink_4_2467(const volatile A&); // { dg-message "note" } six sink_4_2467(const A&&); // { dg-message "note" } seven sink_4_2467(volatile A&&); // { dg-message "note" } @@ -737,11 +813,13 @@ int test4_2467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_2467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 815 } sink_4_2467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 817 } return 0; } -two sink_4_2567(const A&); // { dg-message "candidates" } +two sink_4_2567(const A&); // { dg-message "two sink_4_2567|no known conversion" } five sink_4_2567( A&&); // { dg-message "note" } six sink_4_2567(const A&&); // { dg-message "note" } seven sink_4_2567(volatile A&&); // { dg-message "" } @@ -754,7 +832,9 @@ int test4_2567() const volatile A cva = a; // { dg-error "lvalue" } sink_4_2567(va); // { dg-error "lvalue" } sink_4_2567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 834 } sink_4_2567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 836 } return 0; } @@ -790,7 +870,7 @@ int test4_2578() return 0; } -two sink_4_2678(const A&); // { dg-message "candidates" } +two sink_4_2678(const A&); // { dg-message "note" } six sink_4_2678(const A&&); // { dg-message "note" } seven sink_4_2678(volatile A&&); // { dg-message "" } eight sink_4_2678(const volatile A&&); // { dg-message "" } @@ -804,10 +884,11 @@ int test4_2678() sink_4_2678(va); // { dg-error "lvalue" } sink_4_2678(cva); // { dg-error "lvalue" } sink_4_2678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 886 } return 0; } -three sink_4_3456(volatile A&); // { dg-message "candidates" } +three sink_4_3456(volatile A&); // { dg-message "three sink_4_3456|no known conversion" } four sink_4_3456(const volatile A&); // { dg-message "note" } five sink_4_3456( A&&); // { dg-message "note" } six sink_4_3456(const A&&); // { dg-message "note" } @@ -819,11 +900,13 @@ int test4_3456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_3456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 902 } sink_4_3456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 904 } return 0; } -three sink_4_3457(volatile A&); // { dg-message "candidates" } +three sink_4_3457(volatile A&); // { dg-message "three sink_4_3457|no known conversion" } four sink_4_3457(const volatile A&); // { dg-message "note" } five sink_4_3457( A&&); // { dg-message "note" } seven sink_4_3457(volatile A&&); // { dg-message "note" } @@ -835,11 +918,13 @@ int test4_3457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_3457(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 920 } sink_4_3457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 922 } return 0; } -three sink_4_3467(volatile A&); // { dg-message "candidates" } +three sink_4_3467(volatile A&); // { dg-message "three sink_4_3467|no known conversion" } four sink_4_3467(const volatile A&); // { dg-message "note" } six sink_4_3467(const A&&); // { dg-message "note" } seven sink_4_3467(volatile A&&); // { dg-message "note" } @@ -851,11 +936,13 @@ int test4_3467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_3467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 938 } sink_4_3467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 940 } return 0; } -three sink_4_3567(volatile A&); // { dg-message "candidates" } +three sink_4_3567(volatile A&); // { dg-message "three sink_4_3567|no known conversion" } five sink_4_3567( A&&); // { dg-message "note" } six sink_4_3567(const A&&); // { dg-message "" } seven sink_4_3567(volatile A&&); // { dg-message "note" } @@ -868,7 +955,9 @@ int test4_3567() const volatile A cva = a; // { dg-error "lvalue" } sink_4_3567(ca); // { dg-error "lvalue" } sink_4_3567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 957 } sink_4_3567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 959 } return 0; } @@ -918,10 +1007,11 @@ int test4_3678() sink_4_3678(ca); // { dg-error "lvalue" } sink_4_3678(cva); // { dg-error "lvalue" } sink_4_3678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 1009 } return 0; } -four sink_4_4567(const volatile A&); // { dg-message "candidates" } +four sink_4_4567(const volatile A&); // { dg-message "note" } five sink_4_4567( A&&); // { dg-message "note" } six sink_4_4567(const A&&); // { dg-message "note" } seven sink_4_4567(volatile A&&); // { dg-message "note" } @@ -933,11 +1023,12 @@ int test4_4567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_4567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 1025 } return 0; } four sink_4_4678(const volatile A&); -six sink_4_4678(const A&&); // { dg-message "candidates" } +six sink_4_4678(const A&&); // { dg-message "note" } seven sink_4_4678(volatile A&&); // { dg-message "note" } eight sink_4_4678(const volatile A&&); // { dg-message "note" } @@ -948,6 +1039,7 @@ int test4_4678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_4_4678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 1041 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv5n.C b/gcc/testsuite/g++.dg/cpp0x/rv5n.C index 92ec1d925e1..660a68986a0 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv5n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv5n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 5 at a time -one sink_5_12345( A&); // { dg-message "candidates" } +one sink_5_12345( A&); // { dg-message "one sink_5_12345|no known conversion" } two sink_5_12345(const A&); // { dg-message "note" } three sink_5_12345(volatile A&); // { dg-message "note" } four sink_5_12345(const volatile A&); // { dg-message "note" } @@ -43,11 +43,13 @@ int test5_12345() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12345(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 45 } sink_5_12345(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } return 0; } -one sink_5_12346( A&); // { dg-message "candidates" } +one sink_5_12346( A&); // { dg-message "one sink_5_12346|no known conversion" } two sink_5_12346(const A&); // { dg-message "note" } three sink_5_12346(volatile A&); // { dg-message "note" } four sink_5_12346(const volatile A&); // { dg-message "note" } @@ -60,11 +62,13 @@ int test5_12346() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12346(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 64 } sink_5_12346(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } return 0; } -one sink_5_12347( A&); // { dg-message "candidates" } +one sink_5_12347( A&); // { dg-message "one sink_5_12347|no known conversion" } two sink_5_12347(const A&); // { dg-message "note" } three sink_5_12347(volatile A&); // { dg-message "note" } four sink_5_12347(const volatile A&); // { dg-message "note" } @@ -77,10 +81,11 @@ int test5_12347() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12347(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 83 } return 0; } -one sink_5_12356( A&); // { dg-message "candidates" } +one sink_5_12356( A&); // { dg-message "one sink_5_12356|no known conversion" } two sink_5_12356(const A&); // { dg-message "note" } three sink_5_12356(volatile A&); // { dg-message "note" } five sink_5_12356( A&&); // { dg-message "note" } @@ -93,12 +98,15 @@ int test5_12356() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12356(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 100 } sink_5_12356(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 102 } sink_5_12356(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 104 } return 0; } -one sink_5_12357( A&); // { dg-message "candidates" } +one sink_5_12357( A&); // { dg-message "one sink_5_12357|no known conversion" } two sink_5_12357(const A&); // { dg-message "note" } three sink_5_12357(volatile A&); // { dg-message "note" } five sink_5_12357( A&&); // { dg-message "note" } @@ -111,7 +119,9 @@ int test5_12357() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12357(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 121 } sink_5_12357(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 123 } return 0; } @@ -131,7 +141,7 @@ int test5_12358() return 0; } -one sink_5_12367( A&); // { dg-message "candidates" } +one sink_5_12367( A&); // { dg-message "one sink_5_12367|no known conversion" } two sink_5_12367(const A&); // { dg-message "note" } three sink_5_12367(volatile A&); // { dg-message "note" } six sink_5_12367(const A&&); // { dg-message "note" } @@ -144,8 +154,11 @@ int test5_12367() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12367(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 156 } sink_5_12367(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 158 } sink_5_12367(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 160 } return 0; } @@ -181,7 +194,7 @@ int test5_12378() return 0; } -one sink_5_12456( A&); // { dg-message "candidates" } +one sink_5_12456( A&); // { dg-message "one sink_5_12456|no known conversion" } two sink_5_12456(const A&); // { dg-message "note" } four sink_5_12456(const volatile A&); // { dg-message "note" } five sink_5_12456( A&&); // { dg-message "note" } @@ -194,11 +207,13 @@ int test5_12456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 209 } sink_5_12456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 211 } return 0; } -one sink_5_12457( A&); // { dg-message "candidates" } +one sink_5_12457( A&); // { dg-message "one sink_5_12457|no known conversion" } two sink_5_12457(const A&); // { dg-message "note" } four sink_5_12457(const volatile A&); // { dg-message "note" } five sink_5_12457( A&&); // { dg-message "note" } @@ -211,10 +226,11 @@ int test5_12457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 228 } return 0; } -one sink_5_12467( A&); // { dg-message "candidates" } +one sink_5_12467( A&); // { dg-message "one sink_5_12467|no known conversion" } two sink_5_12467(const A&); // { dg-message "note" } four sink_5_12467(const volatile A&); // { dg-message "note" } six sink_5_12467(const A&&); // { dg-message "note" } @@ -227,11 +243,13 @@ int test5_12467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_12467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 245 } sink_5_12467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 247 } return 0; } -one sink_5_12567( A&); // { dg-message "candidates" } +one sink_5_12567( A&); // { dg-message "one sink_5_12567|no known conversion" } two sink_5_12567(const A&); // { dg-message "note" } five sink_5_12567( A&&); // { dg-message "note" } six sink_5_12567(const A&&); // { dg-message "note" } @@ -245,7 +263,9 @@ int test5_12567() const volatile A cva = a; // { dg-error "lvalue" } sink_5_12567(va); // { dg-error "lvalue" } sink_5_12567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 265 } sink_5_12567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 267 } return 0; } @@ -284,7 +304,7 @@ int test5_12578() } one sink_5_12678( A&); -two sink_5_12678(const A&); // { dg-message "candidates" } +two sink_5_12678(const A&); // { dg-message "note" } six sink_5_12678(const A&&); // { dg-message "note" } seven sink_5_12678(volatile A&&); // { dg-message "" } eight sink_5_12678(const volatile A&&); // { dg-message "" } @@ -298,10 +318,11 @@ int test5_12678() sink_5_12678(va); // { dg-error "lvalue" } sink_5_12678(cva); // { dg-error "lvalue" } sink_5_12678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 320 } return 0; } -one sink_5_13456( A&); // { dg-message "candidates" } +one sink_5_13456( A&); // { dg-message "one sink_5_13456|no known conversion" } three sink_5_13456(volatile A&); // { dg-message "note" } four sink_5_13456(const volatile A&); // { dg-message "note" } five sink_5_13456( A&&); // { dg-message "note" } @@ -314,11 +335,13 @@ int test5_13456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_13456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 337 } sink_5_13456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 339 } return 0; } -one sink_5_13457( A&); // { dg-message "candidates" } +one sink_5_13457( A&); // { dg-message "one sink_5_13457|no known conversion" } three sink_5_13457(volatile A&); // { dg-message "note" } four sink_5_13457(const volatile A&); // { dg-message "note" } five sink_5_13457( A&&); // { dg-message "note" } @@ -331,11 +354,13 @@ int test5_13457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_13457(c_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 356 } sink_5_13457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 358 } return 0; } -one sink_5_13467( A&); // { dg-message "candidates" } +one sink_5_13467( A&); // { dg-message "one sink_5_13467|no known conversion" } three sink_5_13467(volatile A&); // { dg-message "note" } four sink_5_13467(const volatile A&); // { dg-message "note" } six sink_5_13467(const A&&); // { dg-message "note" } @@ -348,11 +373,13 @@ int test5_13467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_13467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 375 } sink_5_13467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 377 } return 0; } -one sink_5_13567( A&); // { dg-message "candidates" } +one sink_5_13567( A&); // { dg-message "one sink_5_13567|no known conversion" } three sink_5_13567(volatile A&); // { dg-message "note" } five sink_5_13567( A&&); // { dg-message "note" } six sink_5_13567(const A&&); // { dg-message "" } @@ -366,7 +393,9 @@ int test5_13567() const volatile A cva = a; // { dg-error "lvalue" } sink_5_13567(ca); // { dg-error "lvalue" } sink_5_13567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 395 } sink_5_13567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 397 } return 0; } @@ -419,10 +448,11 @@ int test5_13678() sink_5_13678(ca); // { dg-error "lvalue" } sink_5_13678(cva); // { dg-error "lvalue" } sink_5_13678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 450 } return 0; } -one sink_5_14567( A&); // { dg-message "candidates" } +one sink_5_14567( A&); // { dg-message "one sink_5_14567|no known conversion" } four sink_5_14567(const volatile A&); // { dg-message "note" } five sink_5_14567( A&&); // { dg-message "note" } six sink_5_14567(const A&&); // { dg-message "note" } @@ -435,12 +465,13 @@ int test5_14567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_14567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 467 } return 0; } one sink_5_14678( A&); four sink_5_14678(const volatile A&); -six sink_5_14678(const A&&); // { dg-message "candidates" } +six sink_5_14678(const A&&); // { dg-message "note" } seven sink_5_14678(volatile A&&); // { dg-message "note" } eight sink_5_14678(const volatile A&&); // { dg-message "note" } @@ -451,6 +482,7 @@ int test5_14678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_14678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 484 } return 0; } @@ -472,7 +504,7 @@ int test5_15678() return 0; } -two sink_5_23456(const A&); // { dg-message "candidates" } +two sink_5_23456(const A&); // { dg-message "two sink_5_23456|no known conversion" } three sink_5_23456(volatile A&); // { dg-message "note" } four sink_5_23456(const volatile A&); // { dg-message "note" } five sink_5_23456( A&&); // { dg-message "note" } @@ -485,12 +517,15 @@ int test5_23456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23456(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 519 } sink_5_23456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 521 } sink_5_23456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 523 } return 0; } -two sink_5_23457(const A&); // { dg-message "candidates" } +two sink_5_23457(const A&); // { dg-message "two sink_5_23457|no known conversion" } three sink_5_23457(volatile A&); // { dg-message "note" } four sink_5_23457(const volatile A&); // { dg-message "note" } five sink_5_23457( A&&); // { dg-message "note" } @@ -503,11 +538,13 @@ int test5_23457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23457(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 540 } sink_5_23457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 542 } return 0; } -two sink_5_23458(const A&); // { dg-message "candidates" } +two sink_5_23458(const A&); // { dg-message "note" } three sink_5_23458(volatile A&); // { dg-message "note" } four sink_5_23458(const volatile A&); // { dg-message "note" } five sink_5_23458( A&&); // { dg-message "note" } @@ -520,10 +557,11 @@ int test5_23458() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23458(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 559 } return 0; } -two sink_5_23467(const A&); // { dg-message "candidates" } +two sink_5_23467(const A&); // { dg-message "two sink_5_23467|no known conversion" } three sink_5_23467(volatile A&); // { dg-message "note" } four sink_5_23467(const volatile A&); // { dg-message "note" } six sink_5_23467(const A&&); // { dg-message "note" } @@ -536,12 +574,15 @@ int test5_23467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23467(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 576 } sink_5_23467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 578 } sink_5_23467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 580 } return 0; } -two sink_5_23468(const A&); // { dg-message "candidates" } +two sink_5_23468(const A&); // { dg-message "note" } three sink_5_23468(volatile A&); // { dg-message "note" } four sink_5_23468(const volatile A&); // { dg-message "note" } six sink_5_23468(const A&&); // { dg-message "note" } @@ -554,10 +595,11 @@ int test5_23468() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23468(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 597 } return 0; } -two sink_5_23478(const A&); // { dg-message "candidates" } +two sink_5_23478(const A&); // { dg-message "note" } three sink_5_23478(volatile A&); // { dg-message "note" } four sink_5_23478(const volatile A&); // { dg-message "note" } seven sink_5_23478(volatile A&&); // { dg-message "note" } @@ -570,10 +612,11 @@ int test5_23478() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23478(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 614 } return 0; } -two sink_5_23567(const A&); // { dg-message "candidates" } +two sink_5_23567(const A&); // { dg-message "two sink_5_23567|no known conversion" } three sink_5_23567(volatile A&); // { dg-message "note" } five sink_5_23567( A&&); // { dg-message "note" } six sink_5_23567(const A&&); // { dg-message "note" } @@ -586,12 +629,15 @@ int test5_23567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23567(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 631 } sink_5_23567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 633 } sink_5_23567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 635 } return 0; } -two sink_5_23568(const A&); // { dg-message "candidates" } +two sink_5_23568(const A&); // { dg-message "note" } three sink_5_23568(volatile A&); // { dg-message "note" } five sink_5_23568( A&&); // { dg-message "note" } six sink_5_23568(const A&&); // { dg-message "note" } @@ -605,10 +651,11 @@ int test5_23568() const volatile A cva = a; // { dg-error "lvalue" } sink_5_23568(cva); // { dg-error "lvalue" } sink_5_23568(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 653 } return 0; } -two sink_5_23578(const A&); // { dg-message "candidates" } +two sink_5_23578(const A&); // { dg-message "note" } three sink_5_23578(volatile A&); // { dg-message "note" } five sink_5_23578( A&&); // { dg-message "note" } seven sink_5_23578(volatile A&&); // { dg-message "note" } @@ -622,10 +669,11 @@ int test5_23578() const volatile A cva = a; // { dg-error "lvalue" } sink_5_23578(cva); // { dg-error "lvalue" } sink_5_23578(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 671 } return 0; } -two sink_5_23678(const A&); // { dg-message "candidates" } +two sink_5_23678(const A&); // { dg-message "note" } three sink_5_23678(volatile A&); // { dg-message "note" } six sink_5_23678(const A&&); // { dg-message "note" } seven sink_5_23678(volatile A&&); // { dg-message "note" } @@ -638,12 +686,14 @@ int test5_23678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_23678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 688 } sink_5_23678(cva); // { dg-error "lvalue" } sink_5_23678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 691 } return 0; } -two sink_5_24567(const A&); // { dg-message "candidates" } +two sink_5_24567(const A&); // { dg-message "two sink_5_24567|no known conversion" } four sink_5_24567(const volatile A&); // { dg-message "note" } five sink_5_24567( A&&); // { dg-message "note" } six sink_5_24567(const A&&); // { dg-message "note" } @@ -656,10 +706,11 @@ int test5_24567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_24567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 708 } return 0; } -two sink_5_24678(const A&); // { dg-message "candidates" } +two sink_5_24678(const A&); // { dg-message "note" } four sink_5_24678(const volatile A&); six sink_5_24678(const A&&); // { dg-message "note" } seven sink_5_24678(volatile A&&); // { dg-message "note" } @@ -672,6 +723,7 @@ int test5_24678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_24678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 725 } return 0; } @@ -692,7 +744,7 @@ int test5_25678() return 0; } -three sink_5_34567(volatile A&); // { dg-message "candidates" } +three sink_5_34567(volatile A&); // { dg-message "three sink_5_34567|no known conversion" } four sink_5_34567(const volatile A&); // { dg-message "note" } five sink_5_34567( A&&); // { dg-message "note" } six sink_5_34567(const A&&); // { dg-message "note" } @@ -705,12 +757,13 @@ int test5_34567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_34567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 759 } return 0; } three sink_5_34678(volatile A&); four sink_5_34678(const volatile A&); -six sink_5_34678(const A&&); // { dg-message "candidates" } +six sink_5_34678(const A&&); // { dg-message "note" } seven sink_5_34678(volatile A&&); // { dg-message "note" } eight sink_5_34678(const volatile A&&); // { dg-message "note" } @@ -721,6 +774,7 @@ int test5_34678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_5_34678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 776 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv6n.C b/gcc/testsuite/g++.dg/cpp0x/rv6n.C index 6a81f66fa5c..d0fdbb7e509 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv6n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv6n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 6 at a time -one sink_6_123456( A&); // { dg-message "candidates" } +one sink_6_123456( A&); // { dg-message "one sink_6_123456|no known conversion" } two sink_6_123456(const A&); // { dg-message "note" } three sink_6_123456(volatile A&); // { dg-message "note" } four sink_6_123456(const volatile A&); // { dg-message "note" } @@ -44,11 +44,13 @@ int test6_123456() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_123456(v_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 46 } sink_6_123456(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 48 } return 0; } -one sink_6_123457( A&); // { dg-message "candidates" } +one sink_6_123457( A&); // { dg-message "one sink_6_123457|no known conversion" } two sink_6_123457(const A&); // { dg-message "note" } three sink_6_123457(volatile A&); // { dg-message "note" } four sink_6_123457(const volatile A&); // { dg-message "note" } @@ -62,10 +64,11 @@ int test6_123457() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_123457(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 66 } return 0; } -two sink_6_235678(const A&); // { dg-message "candidates" } +two sink_6_235678(const A&); // { dg-message "note" } three sink_6_235678(volatile A&); // { dg-message "note" } five sink_6_235678( A&&); // { dg-message "note" } six sink_6_235678(const A&&); // { dg-message "note" } @@ -79,11 +82,12 @@ int test6_235678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_235678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 84 } sink_6_235678(cva); // { dg-error "lvalue" } return 0; } -two sink_6_234678(const A&); // { dg-message "candidates" } +two sink_6_234678(const A&); // { dg-message "note" } three sink_6_234678(volatile A&); // { dg-message "note" } four sink_6_234678(const volatile A&); // { dg-message "note" } six sink_6_234678(const A&&); // { dg-message "note" } @@ -97,11 +101,13 @@ int test6_234678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_234678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 103 } sink_6_234678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 105 } return 0; } -two sink_6_234578(const A&); // { dg-message "candidates" } +two sink_6_234578(const A&); // { dg-message "note" } three sink_6_234578(volatile A&); // { dg-message "note" } four sink_6_234578(const volatile A&); // { dg-message "note" } five sink_6_234578( A&&); // { dg-message "note" } @@ -115,10 +121,11 @@ int test6_234578() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_234578(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 123 } return 0; } -two sink_6_234568(const A&); // { dg-message "candidates" } +two sink_6_234568(const A&); // { dg-message "note" } three sink_6_234568(volatile A&); // { dg-message "note" } four sink_6_234568(const volatile A&); // { dg-message "note" } five sink_6_234568( A&&); // { dg-message "note" } @@ -132,10 +139,11 @@ int test6_234568() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_234568(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 141 } return 0; } -two sink_6_234567(const A&); // { dg-message "candidates" } +two sink_6_234567(const A&); // { dg-message "two sink_6_234567|no known conversion" } three sink_6_234567(volatile A&); // { dg-message "note" } four sink_6_234567(const volatile A&); // { dg-message "note" } five sink_6_234567( A&&); // { dg-message "note" } @@ -149,14 +157,16 @@ int test6_234567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_234567(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 159 } sink_6_234567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 161 } return 0; } one sink_6_134678( A&); three sink_6_134678(volatile A&); four sink_6_134678(const volatile A&); -six sink_6_134678(const A&&); // { dg-message "candidates" } +six sink_6_134678(const A&&); // { dg-message "note" } seven sink_6_134678(volatile A&&); // { dg-message "note" } eight sink_6_134678(const volatile A&&); // { dg-message "note" } @@ -167,11 +177,12 @@ int test6_134678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_134678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 179 } return 0; } one sink_6_124678( A&); -two sink_6_124678(const A&); // { dg-message "candidates" } +two sink_6_124678(const A&); // { dg-message "note" } four sink_6_124678(const volatile A&); six sink_6_124678(const A&&); // { dg-message "note" } seven sink_6_124678(volatile A&&); // { dg-message "note" } @@ -184,11 +195,12 @@ int test6_124678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_124678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 197 } return 0; } one sink_6_123678( A&); -two sink_6_123678(const A&); // { dg-message "candidates" } +two sink_6_123678(const A&); // { dg-message "note" } three sink_6_123678(volatile A&); six sink_6_123678(const A&&); // { dg-message "note" } seven sink_6_123678(volatile A&&); // { dg-message "note" } @@ -202,10 +214,11 @@ int test6_123678() const volatile A cva = a; // { dg-error "lvalue" } sink_6_123678(cva); // { dg-error "lvalue" } sink_6_123678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 216 } return 0; } -one sink_6_123567( A&); // { dg-message "candidates" } +one sink_6_123567( A&); // { dg-message "one sink_6_123567|no known conversion" } two sink_6_123567(const A&); // { dg-message "note" } three sink_6_123567(volatile A&); // { dg-message "note" } five sink_6_123567( A&&); // { dg-message "note" } @@ -219,7 +232,9 @@ int test6_123567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_123567(cva); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 234 } sink_6_123567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 236 } return 0; } @@ -257,7 +272,7 @@ int test6_123578() return 0; } -one sink_6_123467( A&); // { dg-message "candidates" } +one sink_6_123467( A&); // { dg-message "one sink_6_123467|no known conversion" } two sink_6_123467(const A&); // { dg-message "note" } three sink_6_123467(volatile A&); // { dg-message "note" } four sink_6_123467(const volatile A&); // { dg-message "note" } @@ -271,11 +286,13 @@ int test6_123467() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_123467(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 288 } sink_6_123467(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 290 } return 0; } -one sink_6_124567( A&); // { dg-message "candidates" } +one sink_6_124567( A&); // { dg-message "one sink_6_124567|no known conversion" } two sink_6_124567(const A&); // { dg-message "note" } four sink_6_124567(const volatile A&); // { dg-message "note" } five sink_6_124567( A&&); // { dg-message "note" } @@ -289,6 +306,7 @@ int test6_124567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_124567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 308 } return 0; } @@ -310,7 +328,7 @@ int test6_125678() return 0; } -one sink_6_134567( A&); // { dg-message "candidates" } +one sink_6_134567( A&); // { dg-message "one sink_6_134567|no known conversion" } three sink_6_134567(volatile A&); // { dg-message "note" } four sink_6_134567(const volatile A&); // { dg-message "note" } five sink_6_134567( A&&); // { dg-message "note" } @@ -324,6 +342,7 @@ int test6_134567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_6_134567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 344 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/rv7n.C b/gcc/testsuite/g++.dg/cpp0x/rv7n.C index 94254b5824b..6071e056813 100644 --- a/gcc/testsuite/g++.dg/cpp0x/rv7n.C +++ b/gcc/testsuite/g++.dg/cpp0x/rv7n.C @@ -30,7 +30,7 @@ const volatile A cv_source(); // 7 at a time -one sink_7_1234567( A&); // { dg-message "candidates" } +one sink_7_1234567( A&); // { dg-message "one sink_7_1234567|no known conversion" } two sink_7_1234567(const A&); // { dg-message "note" } three sink_7_1234567(volatile A&); // { dg-message "note" } four sink_7_1234567(const volatile A&); // { dg-message "note" } @@ -45,6 +45,7 @@ int test7_1234567() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_7_1234567(cv_source()); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } return 0; } @@ -66,7 +67,7 @@ int test7_1235678() return 0; } -two sink_7_2345678(const A&); // { dg-message "candidates" } +two sink_7_2345678(const A&); // { dg-message "note" } three sink_7_2345678(volatile A&); // { dg-message "note" } four sink_7_2345678(const volatile A&); // { dg-message "note" } five sink_7_2345678( A&&); // { dg-message "note" } @@ -81,11 +82,12 @@ int test7_2345678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_7_2345678(a); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 84 } return 0; } one sink_7_1234678( A&); -two sink_7_1234678(const A&); // { dg-message "candidates" } +two sink_7_1234678(const A&); // { dg-message "note" } three sink_7_1234678(volatile A&); four sink_7_1234678(const volatile A&); six sink_7_1234678(const A&&); // { dg-message "note" } @@ -99,6 +101,7 @@ int test7_1234678() volatile A va; const volatile A cva = a; // { dg-error "lvalue" } sink_7_1234678(source()); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 103 } return 0; } diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C index 5a9cbe03e74..fa2bb6aed86 100644 --- a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C +++ b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C @@ -1,13 +1,14 @@ // { dg-options "-std=c++0x" } template <class T, class U = double> -void f(T t = 0, U u = 0); // { dg-message "candidate" } +void f(T t = 0, U u = 0); // { dg-message "note" } void g() { f(1, 'c'); // f<int,char>(1,'c') f(1); // f<int,double>(1,0) f(); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } f<int>(); // f<int,double>(0,0) f<int,char>(); // f<int,char>(0,0) } diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing4.C b/gcc/testsuite/g++.dg/cpp0x/trailing4.C index 247efd4b56c..d67b3b61151 100644 --- a/gcc/testsuite/g++.dg/cpp0x/trailing4.C +++ b/gcc/testsuite/g++.dg/cpp0x/trailing4.C @@ -5,7 +5,8 @@ template<class T, class U> auto f(T,U) -> decltype(T() + U()) { return T() + U(); } -template<class T> void g(T){} // { dg-message "candidate" } +template<class T> void g(T){} // { dg-message "note" } int main() { g(f); } // { dg-error "no matching function" } +// { dg-message "candidate" "candidate note" { target *-*-* } 10 } diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C index 60c47176d00..bd973055d06 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C @@ -1,9 +1,11 @@ // { dg-options "-std=gnu++0x" } -template<class X, class Y, class... Z> X f(Y); // { dg-message "candidate" } +template<class X, class Y, class... Z> X f(Y); // { dg-message "note" } void g() { int i = f<int>(5.6); int j = f(5.6); // { dg-error "no matching" } - f<void>(f<int, bool>); + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } + f<void>(f<int, bool>); f<void>(f<int>); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C index b8aec1f5140..5bf211696a3 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C @@ -1,5 +1,5 @@ // { dg-options "-std=gnu++0x" } -template<class X, class Y, class Z> X f(Y,Z); // { dg-message "candidate" } +template<class X, class Y, class Z> X f(Y,Z); // { dg-message "note" } template<class... Args> void f2(); void g() { @@ -8,5 +8,6 @@ void g() f<int>("aa",3.0); // Y is deduced to be char*, and // Z is deduced to be double f("aa",3.0); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } f2<char, short, int, long>(); // okay } diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic35.C b/gcc/testsuite/g++.dg/cpp0x/variadic35.C index a85771d1595..1f21976e864 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic35.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic35.C @@ -1,9 +1,10 @@ // { dg-options "-std=gnu++0x" } template<int I, typename... Args> -void get_ith(const Args&... args); // { dg-message "candidate" } +void get_ith(const Args&... args); // { dg-message "note" } void f() { get_ith<1, float>(1, 2.0, 'x'); get_ith<1, int, double, char, int>(1, 2.0, 'x'); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35147.C b/gcc/testsuite/g++.dg/cpp0x/vt-35147.C index 9008180799b..fecb36ec8c9 100644 --- a/gcc/testsuite/g++.dg/cpp0x/vt-35147.C +++ b/gcc/testsuite/g++.dg/cpp0x/vt-35147.C @@ -1,7 +1,7 @@ // { dg-options "-std=c++0x" } template<typename _Tp> - _Tp&& forward(_Tp&& __t) { return __t; } // { dg-message "candidate" } + _Tp&& forward(_Tp&& __t) { return __t; } // { dg-message "note" } void f(...); @@ -9,6 +9,7 @@ template<typename... Args> void g(Args&&... args) { f(forward<Args...>(args...)); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 11 } } void h() diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C index 16df69bd892..2ff7e5b0b51 100644 --- a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C @@ -1,9 +1,10 @@ // { dg-options "-std=c++0x" } template<class U, class... T> -void f() // { dg-message "candidate" } +void f() // { dg-message "note" } { f<T...>(); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } } template<> diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C index 5297a4e2b28..3e6f6b5912b 100644 --- a/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C @@ -32,6 +32,6 @@ We want to express that the DIE of S::T<int> must be a child of the DIE of S, li Hence the slightly odd regexp: - { dg-final { scan-assembler "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"S\\\\0\"\[ \t\]+\(\[@|#!\]|//?\)\[ \t\]+DW_AT_name\[\n\r\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"T<int>\\\\0\"\[ \t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\(\[@|#!\]|//?\)\[ \t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of children of DIE\[^\n\r\]*" } } + { dg-final { scan-assembler "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"S\\\\0\"\[ \t\]+\(\[@|#;!\]|//?\)\[ \t\]+DW_AT_name\[\n\r\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"T<int>\\\\0\"\[ \t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\(\[@|#;!\]|//?\)\[ \t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of children of DIE\[^\n\r\]*" } } */ diff --git a/gcc/testsuite/g++.dg/expr/cond9.C b/gcc/testsuite/g++.dg/expr/cond9.C index e71a84ba43e..e8e1397c06e 100644 --- a/gcc/testsuite/g++.dg/expr/cond9.C +++ b/gcc/testsuite/g++.dg/expr/cond9.C @@ -6,5 +6,7 @@ struct A { // { dg-message "A" } void foo(volatile A a) { 1 ? a : 0; // { dg-error "match|temporary" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } 1 ? 0 : a; // { dg-error "match|temporary" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } } diff --git a/gcc/testsuite/g++.dg/expr/pmf-1.C b/gcc/testsuite/g++.dg/expr/pmf-1.C index 8f6426b401b..3dd01c6b90f 100644 --- a/gcc/testsuite/g++.dg/expr/pmf-1.C +++ b/gcc/testsuite/g++.dg/expr/pmf-1.C @@ -7,7 +7,7 @@ struct A { void f(); - void foo(void (A::*)(int)); // { dg-message "candidate" "" } + void foo(void (A::*)(int)); // { dg-message "void A::foo|no known conversion" "" } template<typename T> void g(T); void h() @@ -15,5 +15,6 @@ struct A void (A::*p)() = &A::f; void (A::*q)() = &(A::f); // { dg-error "parenthesized" "" } foo(&g<int>); // { dg-error "no matching" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } }; diff --git a/gcc/testsuite/g++.dg/ext/label5.C b/gcc/testsuite/g++.dg/ext/label5.C index 9c5a24e5803..fc611cd4159 100644 --- a/gcc/testsuite/g++.dg/ext/label5.C +++ b/gcc/testsuite/g++.dg/ext/label5.C @@ -3,5 +3,4 @@ struct A { }; int main() { b: A() && && b; } // { dg-error "A\\(\\) && && *b" } - -// { dg-message "candidate" "additional" { target *-*-* } 5 } +// { dg-message "candidate|operator&&|no known conversion" "additional" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon8.C b/gcc/testsuite/g++.dg/ext/visibility/anon8.C index b0d3849b26f..8ef8d682336 100644 --- a/gcc/testsuite/g++.dg/ext/visibility/anon8.C +++ b/gcc/testsuite/g++.dg/ext/visibility/anon8.C @@ -2,7 +2,7 @@ // { dg-do compile } template <void (*fn) ()> -void call () // { dg-message "candidate" } +void call () // { dg-message "note" } { fn (); } @@ -27,7 +27,9 @@ int main () }; call<&B1::fn1> (); call<&B2::fn2> (); // { dg-error "not external linkage|no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 29 } call<&fn3> (); call<&B1::fn4> (); call<&fn5> (); // { dg-error "not external linkage|no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 33 } } diff --git a/gcc/testsuite/g++.dg/ext/vla2.C b/gcc/testsuite/g++.dg/ext/vla2.C index 5e37f8a5fc2..f6a9debca98 100644 --- a/gcc/testsuite/g++.dg/ext/vla2.C +++ b/gcc/testsuite/g++.dg/ext/vla2.C @@ -8,11 +8,12 @@ // errors. template <unsigned int N> -char* begin(char (&a) [N] ); // { dg-message "candidate" } +char* begin(char (&a) [N] ); // { dg-message "note" } void bar(int i) { char d[i] ; begin(d); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } diff --git a/gcc/testsuite/g++.dg/gomp/pr26690-1.C b/gcc/testsuite/g++.dg/gomp/pr26690-1.C index 71f1eb311ee..17e01b3d553 100644 --- a/gcc/testsuite/g++.dg/gomp/pr26690-1.C +++ b/gcc/testsuite/g++.dg/gomp/pr26690-1.C @@ -1,9 +1,9 @@ // PR c++/26690 // { dg-do compile } -struct A // { dg-message "A::A" } +struct A // { dg-message "A::A|candidate expects" } { - A (int); // { dg-message "candidates" } + A (int); // { dg-message "note" } }; void @@ -11,5 +11,6 @@ foo () { A a(0); #pragma omp parallel private (a) // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } ; } diff --git a/gcc/testsuite/g++.dg/gomp/pr26690-2.C b/gcc/testsuite/g++.dg/gomp/pr26690-2.C index 5d29f322c9d..ca01a3a5954 100644 --- a/gcc/testsuite/g++.dg/gomp/pr26690-2.C +++ b/gcc/testsuite/g++.dg/gomp/pr26690-2.C @@ -4,7 +4,7 @@ struct A { A (int x = 6); // { dg-message "A::A\\(int\\)" } - A (long long x = 12LL); // { dg-message "candidates" } + A (long long x = 12LL); // { dg-message "note" } }; void @@ -12,5 +12,6 @@ foo () { A a(6); #pragma omp parallel private (a) // { dg-error "call of overloaded" } + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } ; } diff --git a/gcc/testsuite/g++.dg/init/synth2.C b/gcc/testsuite/g++.dg/init/synth2.C index 9e8a08a6ea3..ed504671559 100644 --- a/gcc/testsuite/g++.dg/init/synth2.C +++ b/gcc/testsuite/g++.dg/init/synth2.C @@ -6,6 +6,7 @@ struct G { }; class A // { dg-error "" } +// { dg-message "candidate" "candidate note" { target *-*-* } 8 } { const G g; }; diff --git a/gcc/testsuite/g++.dg/init/synth4.C b/gcc/testsuite/g++.dg/init/synth4.C new file mode 100644 index 00000000000..2b0b0b95a83 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/synth4.C @@ -0,0 +1,18 @@ +// PR c++/45822 + +struct A +{ + A(int); +}; + +struct B +{ + B(A = 0); +}; + +struct C +{ + B b; +}; + +C c; diff --git a/gcc/testsuite/g++.dg/lookup/conv-1.C b/gcc/testsuite/g++.dg/lookup/conv-1.C index b861c6036df..0c4393e8a40 100644 --- a/gcc/testsuite/g++.dg/lookup/conv-1.C +++ b/gcc/testsuite/g++.dg/lookup/conv-1.C @@ -22,5 +22,6 @@ struct B : A1, A2 int Foo (B const &b) { return b; // { dg-error "ambiguous" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 24 } } diff --git a/gcc/testsuite/g++.dg/lookup/new1.C b/gcc/testsuite/g++.dg/lookup/new1.C index b29aa46ce42..11a6d97ddf7 100644 --- a/gcc/testsuite/g++.dg/lookup/new1.C +++ b/gcc/testsuite/g++.dg/lookup/new1.C @@ -6,8 +6,9 @@ int main() { int i; void* operator new(__SIZE_TYPE__ s, int* p); int* e = new(&i) int; // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } int* f = new int; return 0; } -// { dg-message "candidate" "" { target *-*-* } 0 } +// { dg-message "operator new|candidate expects" "" { target *-*-* } 0 } diff --git a/gcc/testsuite/g++.dg/lookup/using9.C b/gcc/testsuite/g++.dg/lookup/using9.C index 7c3b30d8873..32abb5371f2 100644 --- a/gcc/testsuite/g++.dg/lookup/using9.C +++ b/gcc/testsuite/g++.dg/lookup/using9.C @@ -4,7 +4,7 @@ // an ambiguous overload set to be created. namespace B { - void f(int); // { dg-message "candidates" } + void f(int); // { dg-message "note" } void f(double); // { dg-message "note" } } @@ -20,6 +20,7 @@ void h() using C::f; f('h'); f(1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } void f(int); // { dg-error "previous using declaration" } } diff --git a/gcc/testsuite/g++.dg/opt/pr46640.C b/gcc/testsuite/g++.dg/opt/pr46640.C new file mode 100644 index 00000000000..0892c9ac861 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr46640.C @@ -0,0 +1,44 @@ +// { dg-do compile { target x86_64-*-* } } +// { dg-options "-fschedule-insns2 -fsel-sched-pipelining -fselective-scheduling2 -fno-exceptions -O" } + +struct QBasicAtomicInt +{ + int i, j; + bool deref () + { + asm volatile ("":"=m" (i), "=qm" (j)); + } +}; + +struct Data +{ + QBasicAtomicInt ref; + void *data; +}; + +struct QByteArray +{ + Data * d; + ~QByteArray () + { + d->ref.deref (); + } +}; + +int indexOf (unsigned); +int stat (void *, int *); +QByteArray encodeName (); + +bool makeDir (unsigned len) +{ + unsigned i = 0; + while (len) + { + int st; + int pos = indexOf (i); + QByteArray baseEncoded = encodeName (); + if (stat (baseEncoded.d->data, &st) && stat (baseEncoded.d, &st)) + return false; + i = pos; + } +} diff --git a/gcc/testsuite/g++.dg/opt/pr46864.C b/gcc/testsuite/g++.dg/opt/pr46864.C new file mode 100644 index 00000000000..0f7b7d2f5b4 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr46864.C @@ -0,0 +1,26 @@ +// PR tree-optimization/46864 +// { dg-do compile } +// { dg-options "-O -fnon-call-exceptions" } + +int baz (); + +struct S +{ + int k; + bool bar () throw () + { + int m = baz (); + for (int i = 0; i < m; i++) + k = i; + return m; + } +}; + +extern S *s; + +void +foo () +{ + while (baz () && s->bar ()) + ; +} diff --git a/gcc/testsuite/g++.dg/other/const1.C b/gcc/testsuite/g++.dg/other/const1.C index 1d5450a2cc0..f010138378f 100644 --- a/gcc/testsuite/g++.dg/other/const1.C +++ b/gcc/testsuite/g++.dg/other/const1.C @@ -13,5 +13,5 @@ struct Foo void Foo::Modify(unsigned j) const { - Foo::i = j; // { dg-error "assignment of data-member" "" } + Foo::i = j; // { dg-error "assignment of member" "" } } diff --git a/gcc/testsuite/g++.dg/other/error13.C b/gcc/testsuite/g++.dg/other/error13.C index 784550180ff..4ee935ad609 100644 --- a/gcc/testsuite/g++.dg/other/error13.C +++ b/gcc/testsuite/g++.dg/other/error13.C @@ -3,8 +3,10 @@ struct A // { dg-message "note" } { A(void x); // { dg-error "invalid use|incomplete type|candidates" } + // { dg-message "" "match candidate text" { target *-*-* } 5 } }; struct B : A {}; // { dg-error "no matching function for call|deleted" } +// { dg-message "candidate" "candidate note" { target *-*-* } 9 } B b; // { dg-message "synthesized method|deleted" } diff --git a/gcc/testsuite/g++.dg/other/error20.C b/gcc/testsuite/g++.dg/other/error20.C index e546b3726e3..f3b17aa196a 100644 --- a/gcc/testsuite/g++.dg/other/error20.C +++ b/gcc/testsuite/g++.dg/other/error20.C @@ -1,7 +1,7 @@ // PR c++/34275 // { dg-do compile } -struct A // { dg-message "operator=" } +struct A // { dg-message "operator=|no known conversion" } { virtual A foo (); }; @@ -9,4 +9,5 @@ struct A // { dg-message "operator=" } void bar (A& a) { a.foo () = 0; // { dg-error "A::foo\\(\\) = 0" } + // { dg-message "candidate" "candidate note" { target *-*-* } 11 } } diff --git a/gcc/testsuite/g++.dg/other/error31.C b/gcc/testsuite/g++.dg/other/error31.C index d3e3e09a37c..95c9d737413 100644 --- a/gcc/testsuite/g++.dg/other/error31.C +++ b/gcc/testsuite/g++.dg/other/error31.C @@ -3,11 +3,12 @@ // { dg-options "" } // { dg-bogus "not supported by" "" { target *-*-* } 0 } -struct A {}; // { dg-message "operator=" } +struct A {}; // { dg-message "operator=|no known conversion" } void foo () { A a; a = ({ { 1; } }); // { dg-error "no match for" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } } diff --git a/gcc/testsuite/g++.dg/other/pr28114.C b/gcc/testsuite/g++.dg/other/pr28114.C index d54fec96085..63ecbf51f4f 100644 --- a/gcc/testsuite/g++.dg/other/pr28114.C +++ b/gcc/testsuite/g++.dg/other/pr28114.C @@ -6,4 +6,5 @@ template<int> void foo(struct {}*); // { dg-message "" } void bar() { foo<0>(0); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/other/ptrmem10.C b/gcc/testsuite/g++.dg/other/ptrmem10.C index 53d5c85a807..bc386ed56be 100644 --- a/gcc/testsuite/g++.dg/other/ptrmem10.C +++ b/gcc/testsuite/g++.dg/other/ptrmem10.C @@ -3,7 +3,7 @@ template <class C, void (C::*M) ()> static -void foo(void *obj) // { dg-message "candidate" } +void foo(void *obj) // { dg-message "note" } { C *p = static_cast<C*>(obj); (p->*M)(); @@ -14,6 +14,7 @@ static void bar(C *c, void (C::*m) ()) { foo<C,m>((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun)" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } struct S diff --git a/gcc/testsuite/g++.dg/other/ptrmem11.C b/gcc/testsuite/g++.dg/other/ptrmem11.C index c1c8677c9dc..119cbb078a2 100644 --- a/gcc/testsuite/g++.dg/other/ptrmem11.C +++ b/gcc/testsuite/g++.dg/other/ptrmem11.C @@ -5,7 +5,7 @@ struct A {}; template <int A::* p> int -foo(A* q) // { dg-message "candidate" } +foo(A* q) // { dg-message "note" } { return q->*p; } @@ -15,6 +15,7 @@ int bar(int T::* p) { return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member)" } + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } int i = bar<A>(0); diff --git a/gcc/testsuite/g++.dg/overload/ambig1.C b/gcc/testsuite/g++.dg/overload/ambig1.C index 21948bf3146..d11e00a187b 100644 --- a/gcc/testsuite/g++.dg/overload/ambig1.C +++ b/gcc/testsuite/g++.dg/overload/ambig1.C @@ -20,4 +20,5 @@ void f(B); // { dg-message "note" "candidate" } int main() { f (42); // { dg-error "ambiguous" "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.dg/overload/arg3.C b/gcc/testsuite/g++.dg/overload/arg3.C index eb65271752e..34624cd22e4 100644 --- a/gcc/testsuite/g++.dg/overload/arg3.C +++ b/gcc/testsuite/g++.dg/overload/arg3.C @@ -10,8 +10,8 @@ struct A {}; struct B : A { - B(int); // { dg-message "B::B" "" } - B(B&); // { dg-message "candidates" "" } + B(int); // { dg-message "B::B|no known conversion" "" } + B(B&); // { dg-message "note" "" } }; void foo(B); // { dg-error "initializing" } @@ -19,4 +19,5 @@ void foo(B); // { dg-error "initializing" } void bar() { foo(0); // { dg-error "no matching function" "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } } diff --git a/gcc/testsuite/g++.dg/overload/builtin1.C b/gcc/testsuite/g++.dg/overload/builtin1.C index 652b8e1b760..fdd208135c7 100644 --- a/gcc/testsuite/g++.dg/overload/builtin1.C +++ b/gcc/testsuite/g++.dg/overload/builtin1.C @@ -13,5 +13,6 @@ int main () { A a; a + a; // { dg-error "ambiguous" "ambiguous" } - // { dg-message "candidates" "candidates" { target *-*-* } 15 } + // { dg-message "operator" "match candidate text" { target *-*-* } 15 } + // { dg-message "candidates" "candidates" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.dg/overload/copy1.C b/gcc/testsuite/g++.dg/overload/copy1.C index 2bd8e539dd1..f0ec385fc9c 100644 --- a/gcc/testsuite/g++.dg/overload/copy1.C +++ b/gcc/testsuite/g++.dg/overload/copy1.C @@ -17,4 +17,5 @@ B f (B const& b) { return b; // { dg-error "matching" "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } } diff --git a/gcc/testsuite/g++.dg/overload/new1.C b/gcc/testsuite/g++.dg/overload/new1.C index 89282faf66c..9adb4c07245 100644 --- a/gcc/testsuite/g++.dg/overload/new1.C +++ b/gcc/testsuite/g++.dg/overload/new1.C @@ -16,6 +16,7 @@ void f(X *x = new X[4]); // { dg-error "" } void f(X *x = new (3) X(6)); // { dg-error "" } void f(X *x = new (2) X[10]); // { dg-error "" } -// { dg-message "candidate" "" { target *-*-* } 00 } +// { dg-message "candidate" "candidate note" { target *-*-* } 18 } +// { dg-message "operator new|candidate expects" "match candidate text" { target *-*-* } 00 } void f(X *x = new X[10][5]); // { dg-error "" } diff --git a/gcc/testsuite/g++.dg/overload/template4.C b/gcc/testsuite/g++.dg/overload/template4.C index 6638dc9d246..8f00d4171d4 100644 --- a/gcc/testsuite/g++.dg/overload/template4.C +++ b/gcc/testsuite/g++.dg/overload/template4.C @@ -8,14 +8,17 @@ namespace void baz (...); // { dg-message "baz" } } -template <int> void foo (...); // { dg-message "candidate" } -template <int> void bar (int, ...); // { dg-message "candidate" } -void baz (...); // { dg-message "candidate" } +template <int> void foo (...); // { dg-message "note" } +template <int> void bar (int, ...); // { dg-message "note" } +void baz (...); // { dg-message "note" } void test () { foo <0> (0); // { dg-error "is ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } bar <1> (0, 1); // { dg-error "is ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } baz (0); // { dg-error "is ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.dg/overload/unknown1.C b/gcc/testsuite/g++.dg/overload/unknown1.C index 61b60b063cd..935f8d4963d 100644 --- a/gcc/testsuite/g++.dg/overload/unknown1.C +++ b/gcc/testsuite/g++.dg/overload/unknown1.C @@ -2,8 +2,9 @@ void foo(void); int foo(int); -template <typename T> void bar(T f); // { dg-message "candidate" } +template <typename T> void bar(T f); // { dg-message "note" } void baz() { bar(foo); // { dg-error "<unresolved overloaded function type>" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/overload/using2.C b/gcc/testsuite/g++.dg/overload/using2.C index 54b12219bd8..514d83f34d8 100644 --- a/gcc/testsuite/g++.dg/overload/using2.C +++ b/gcc/testsuite/g++.dg/overload/using2.C @@ -73,10 +73,12 @@ int main () { exit (0); _exit (0); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 75 } abort (); c1 (); C1 (); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 80 } c2 (); C2 (); // one might expect an ambiguous call error here as well, but @@ -84,6 +86,7 @@ int main () { c3 (); C3 (); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 88 } C3 (0); C3 (0l); } diff --git a/gcc/testsuite/g++.dg/parse/crash5.C b/gcc/testsuite/g++.dg/parse/crash5.C index 4597d6cf9af..0ac70297992 100644 --- a/gcc/testsuite/g++.dg/parse/crash5.C +++ b/gcc/testsuite/g++.dg/parse/crash5.C @@ -1,13 +1,15 @@ // { dg-options "-w" } class QString { // { dg-error "previous definition" } - QString (const QString & a); // { dg-message "candidate is" } + QString (const QString & a); // { dg-message "QString::QString|candidate expects" } }; class QString { }; // { dg-error "redefinition" } const QString q () { QString z; // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } int x; return x ? QString () : QString (); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.dg/parse/error19.C b/gcc/testsuite/g++.dg/parse/error19.C index 3b7e7175b17..010a4032e76 100644 --- a/gcc/testsuite/g++.dg/parse/error19.C +++ b/gcc/testsuite/g++.dg/parse/error19.C @@ -1,7 +1,7 @@ // { dg-options "-fshow-column -fmessage-length=0 -ansi -pedantic-errors -Wno-long-long " } // PR C++/17867 -struct A // { dg-message "8:operator=" } +struct A // { dg-message "8:operator=|no known conversion for implicit" } { A(int); }; @@ -11,4 +11,5 @@ const A& foo(); void bar() { foo()=A(0); // { dg-error "12:no match for 'operator='" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.dg/parse/error28.C b/gcc/testsuite/g++.dg/parse/error28.C index a0b1e7f690f..3ca210aa6b7 100644 --- a/gcc/testsuite/g++.dg/parse/error28.C +++ b/gcc/testsuite/g++.dg/parse/error28.C @@ -2,10 +2,11 @@ // PR c++/21908 struct virt { virt () {} virt (int i) {} }; -struct der : public virtual virt { // { dg-message "8:der::der" } - der (int i) : virt(i) {} // { dg-message "3:der::der" } +struct der : public virtual virt { // { dg-message "8:der::der|candidate expects" } + der (int i) : virt(i) {} // { dg-message "3:der::der|candidate expects" } }; struct top : public der { top () {} // { dg-bogus "der\\(const" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } }; // { dg-error "10:no matching function for call to 'der" "" { target *-*-* } 9 } diff --git a/gcc/testsuite/g++.dg/parse/template7.C b/gcc/testsuite/g++.dg/parse/template7.C index e07d5f85d8f..0d3f3fa24a1 100644 --- a/gcc/testsuite/g++.dg/parse/template7.C +++ b/gcc/testsuite/g++.dg/parse/template7.C @@ -1,4 +1,5 @@ template <int I> -void f(); // { dg-message "candidate" } +void f(); // { dg-message "note" } void g() { f<(3, 2)>(); } // { dg-error "" } +// { dg-message "candidate" "candidate note" { target *-*-* } 4 } diff --git a/gcc/testsuite/g++.dg/parse/typename7.C b/gcc/testsuite/g++.dg/parse/typename7.C index 0ac53112126..2d823f8078e 100644 --- a/gcc/testsuite/g++.dg/parse/typename7.C +++ b/gcc/testsuite/g++.dg/parse/typename7.C @@ -7,9 +7,10 @@ struct A { - template<typename> void foo(int); // { dg-message "candidate" } - template<typename T> void bar(T t) { // { dg-message "candidate" } + template<typename> void foo(int); // { dg-message "note" } + template<typename T> void bar(T t) { // { dg-message "note" } this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } template<typename T> void bad(T t) { foo<typename T>(t); } // { dg-error "expected|parse error|no matching" } }; @@ -19,6 +20,7 @@ struct B { void bar(T t) { A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } void bad(T t) { B<typename T>::bar(t); } // { dg-error "invalid|not a template" } }; diff --git a/gcc/testsuite/g++.dg/rtti/typeid6.C b/gcc/testsuite/g++.dg/rtti/typeid6.C index adc5bbb02fb..d8879c59ced 100644 --- a/gcc/testsuite/g++.dg/rtti/typeid6.C +++ b/gcc/testsuite/g++.dg/rtti/typeid6.C @@ -8,4 +8,5 @@ namespace std template<int> void foo() { !typeid(void); // { dg-error "!typeid\\(void\\)|candidate is" } + // { dg-message "" "match candidate text" { target *-*-* } 10 } } diff --git a/gcc/testsuite/g++.dg/tc1/dr152.C b/gcc/testsuite/g++.dg/tc1/dr152.C index fdf4f124bb1..f930d2e28ea 100644 --- a/gcc/testsuite/g++.dg/tc1/dr152.C +++ b/gcc/testsuite/g++.dg/tc1/dr152.C @@ -4,7 +4,7 @@ namespace N1 { struct X { - X(); // { dg-message "candidate" } + X(); // { dg-message "note" } explicit X(const X&); }; void f(X); // { dg-error "initializing" } @@ -12,13 +12,14 @@ namespace N1 { { X x; f(x); // { dg-error "matching" "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } } } namespace N2 { template <class T> struct X { - X(); // { dg-message "candidate" } + X(); // { dg-message "note" } explicit X(const X&); }; @@ -30,6 +31,7 @@ namespace N2 { { X<T> x; N2::f(x); // { dg-error "matching" "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 33 } } template int foo<float>(); // { dg-message "instantiated from here" } diff --git a/gcc/testsuite/g++.dg/template/conv11.C b/gcc/testsuite/g++.dg/template/conv11.C index de41d6a2122..57d06af3ee7 100644 --- a/gcc/testsuite/g++.dg/template/conv11.C +++ b/gcc/testsuite/g++.dg/template/conv11.C @@ -1,10 +1,11 @@ int i; struct A { - template <class T> operator T&() { return i; } // { dg-message "candidate" } + template <class T> operator T&() { return i; } // { dg-message "note" } }; int main() { A().operator int(); // { dg-error "operator int" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.dg/template/copy1.C b/gcc/testsuite/g++.dg/template/copy1.C index bec506dd991..c6b3ff80665 100644 --- a/gcc/testsuite/g++.dg/template/copy1.C +++ b/gcc/testsuite/g++.dg/template/copy1.C @@ -7,8 +7,9 @@ struct A { A(A&); // { dg-message "note" } - template <class T> A(T); // { dg-message "candidate" } + template <class T> A(T); // { dg-message "note" } }; A a = 0; // { dg-error "no matching function" } +// { dg-message "candidate" "candidate note" { target *-*-* } 13 } diff --git a/gcc/testsuite/g++.dg/template/crash37.C b/gcc/testsuite/g++.dg/template/crash37.C index aef0df0846e..60724231eab 100644 --- a/gcc/testsuite/g++.dg/template/crash37.C +++ b/gcc/testsuite/g++.dg/template/crash37.C @@ -11,7 +11,7 @@ struct coperator_stack struct helper {}; template<class F> -void bla(F f) // { dg-message "candidate is" } +void bla(F f) // { dg-message "bla|no known conversion" } { } @@ -21,6 +21,7 @@ struct definition definition() { bla(coperator_stack::push3<helper>); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } } }; diff --git a/gcc/testsuite/g++.dg/template/deduce3.C b/gcc/testsuite/g++.dg/template/deduce3.C index fbf41e0e328..e8a1d4e2b51 100644 --- a/gcc/testsuite/g++.dg/template/deduce3.C +++ b/gcc/testsuite/g++.dg/template/deduce3.C @@ -1,9 +1,11 @@ template <typename T> -void f(int, T (*)() = 0); // { dg-message "candidate" } +void f(int, T (*)() = 0); // { dg-message "note" } void g() { typedef int A[2]; f<A>(0); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } typedef void F(); f<F>(0); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.dg/template/dependent-expr5.C b/gcc/testsuite/g++.dg/template/dependent-expr5.C index b36d38233e9..1e850cd54e5 100644 --- a/gcc/testsuite/g++.dg/template/dependent-expr5.C +++ b/gcc/testsuite/g++.dg/template/dependent-expr5.C @@ -40,9 +40,12 @@ struct foo { bind (&bar::baikt); bind (&barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 42 } bind (&foo::barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 44 } bindm (&barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } bindm (&foo::barf); bindn (&barf); @@ -50,11 +53,15 @@ struct foo { bindb (&barf); bindb (&foo::barf); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 55 } bind (&bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 58 } bind (&bar::bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 60 } bindm (&bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 63 } bindm (&bar::bark); bindn (&bark); @@ -62,6 +69,7 @@ struct foo { bindb (&bark); bindb (&bar::bark); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 71 } } }; @@ -84,9 +92,12 @@ struct foo { bind (&barT::baikt); bind (&barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 94 } bind (&foo::barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 96 } bindm (&barf); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 99 } bindm (&foo::barf); bindn (&barf); @@ -94,11 +105,15 @@ struct foo { bindb (&barf); bindb (&foo::barf); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 107 } bind (&bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 110 } bind (&barT::bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 112 } bindm (&bark); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 115 } bindm (&barT::bark); bindn (&bark); @@ -106,6 +121,7 @@ struct foo { bindb (&bark); bindb (&barT::bark); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 123 } } }; diff --git a/gcc/testsuite/g++.dg/template/error38.C b/gcc/testsuite/g++.dg/template/error38.C index 6c25b9f9c0f..14a21329988 100644 --- a/gcc/testsuite/g++.dg/template/error38.C +++ b/gcc/testsuite/g++.dg/template/error38.C @@ -32,8 +32,12 @@ int main() { A<B> a; a.f(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 34 } a.g(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 36 } f(i); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 39 } f(p); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 41 } } diff --git a/gcc/testsuite/g++.dg/template/error40.C b/gcc/testsuite/g++.dg/template/error40.C index c5df56fc1be..7746ed2cee3 100644 --- a/gcc/testsuite/g++.dg/template/error40.C +++ b/gcc/testsuite/g++.dg/template/error40.C @@ -26,5 +26,7 @@ struct B int main() { f(1); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } B<A<int> >().f(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 30 } } diff --git a/gcc/testsuite/g++.dg/template/friend.C b/gcc/testsuite/g++.dg/template/friend.C index ac22f2ffb2d..44cbce938d7 100644 --- a/gcc/testsuite/g++.dg/template/friend.C +++ b/gcc/testsuite/g++.dg/template/friend.C @@ -26,4 +26,5 @@ int main() { s<int>::t y; cout << y; // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } } diff --git a/gcc/testsuite/g++.dg/template/incomplete2.C b/gcc/testsuite/g++.dg/template/incomplete2.C index 73b6c6fd64d..d86ea06bcd0 100644 --- a/gcc/testsuite/g++.dg/template/incomplete2.C +++ b/gcc/testsuite/g++.dg/template/incomplete2.C @@ -3,11 +3,12 @@ struct A; -template<A&> void foo(); // { dg-message "candidate" } +template<A&> void foo(); // { dg-message "note" } A a; // { dg-error "incomplete type" } void bar() { foo<a>(); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } } diff --git a/gcc/testsuite/g++.dg/template/instantiate5.C b/gcc/testsuite/g++.dg/template/instantiate5.C index 9cdf310c738..e592c65d816 100644 --- a/gcc/testsuite/g++.dg/template/instantiate5.C +++ b/gcc/testsuite/g++.dg/template/instantiate5.C @@ -13,12 +13,13 @@ int baz() { return A<0>::i; } struct B { - static void foo (int); // { dg-message "candidate is" } + static void foo (int); // { dg-message "B::foo|candidate expects" } }; template <typename T> struct C { virtual void bar() const { T::foo(); } // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } }; C<B> c; // { dg-message "instantiated" } diff --git a/gcc/testsuite/g++.dg/template/local4.C b/gcc/testsuite/g++.dg/template/local4.C index e3044e993ee..7ee922ba6d3 100644 --- a/gcc/testsuite/g++.dg/template/local4.C +++ b/gcc/testsuite/g++.dg/template/local4.C @@ -1,8 +1,9 @@ // PR c++/17413 -template <typename T> void foo() {} // { dg-message "candidate" } +template <typename T> void foo() {} // { dg-message "note" } int main () { struct S {}; foo<S> (); // { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.dg/template/local6.C b/gcc/testsuite/g++.dg/template/local6.C index 1fa39bc7a75..4a87177c9a1 100644 --- a/gcc/testsuite/g++.dg/template/local6.C +++ b/gcc/testsuite/g++.dg/template/local6.C @@ -1,10 +1,11 @@ template <class T> struct PCVector2 // { dg-message "note" } { - template <class T2> PCVector2(const PCVector2<T> &cv) ; // { dg-message "candidate" } + template <class T2> PCVector2(const PCVector2<T> &cv) ; // { dg-message "note" } PCVector2<T> operator- (const PCVector2<T> &ov) const { return PCVector2<T>(ov.xFIELD, ov.yFIELD); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } T xFIELD, yFIELD; diff --git a/gcc/testsuite/g++.dg/template/new3.C b/gcc/testsuite/g++.dg/template/new3.C index 50be5f1c3ba..230330ec66c 100644 --- a/gcc/testsuite/g++.dg/template/new3.C +++ b/gcc/testsuite/g++.dg/template/new3.C @@ -1,4 +1,4 @@ -extern void *operator new(__SIZE_TYPE__); // { dg-message "candidate" } +extern void *operator new(__SIZE_TYPE__); // { dg-message "note" } template <class T > struct C @@ -6,6 +6,7 @@ struct C void f() { int* node; new (&node) int(0); // { dg-error "new" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } }; diff --git a/gcc/testsuite/g++.dg/template/operator9.C b/gcc/testsuite/g++.dg/template/operator9.C index dfd491d4f04..35be778765a 100644 --- a/gcc/testsuite/g++.dg/template/operator9.C +++ b/gcc/testsuite/g++.dg/template/operator9.C @@ -5,5 +5,6 @@ template<operator+> void foo(); // { dg-error "before|non-function|template" } void bar() { foo(); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.dg/template/overload6.C b/gcc/testsuite/g++.dg/template/overload6.C index fd868333447..5e26c448b18 100644 --- a/gcc/testsuite/g++.dg/template/overload6.C +++ b/gcc/testsuite/g++.dg/template/overload6.C @@ -14,4 +14,5 @@ struct A template<int> void foo() { unique(A().begin); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } diff --git a/gcc/testsuite/g++.dg/template/ptrmem2.C b/gcc/testsuite/g++.dg/template/ptrmem2.C index 848a6d9cca0..1919047360a 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem2.C +++ b/gcc/testsuite/g++.dg/template/ptrmem2.C @@ -7,9 +7,10 @@ struct A {}; -template <typename T> T A::* Foo (); // { dg-message "candidate" } +template <typename T> T A::* Foo (); // { dg-message "note" } void Baz () { Foo <int &> (); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } } diff --git a/gcc/testsuite/g++.dg/template/ptrmem20.C b/gcc/testsuite/g++.dg/template/ptrmem20.C index 23488737a67..dee3c629a70 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem20.C +++ b/gcc/testsuite/g++.dg/template/ptrmem20.C @@ -8,9 +8,10 @@ struct B void foo(); }; -template<void (A::*)()> void bar(); // { dg-message "candidate" } +template<void (A::*)()> void bar(); // { dg-message "note" } void baz() { bar<&B::foo>(); // { dg-error "not a valid template argument|no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.dg/template/ptrmem4.C b/gcc/testsuite/g++.dg/template/ptrmem4.C index b1422c3e811..62262c4b8e9 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem4.C +++ b/gcc/testsuite/g++.dg/template/ptrmem4.C @@ -6,7 +6,7 @@ // Pointer to member function template argument deduction ICE. -template <class CONT> void queryAliases(CONT& fill_me); // { dg-message "candidate is" } +template <class CONT> void queryAliases(CONT& fill_me); // { dg-message "queryAliases|no known conversion" } struct SpyExample { @@ -17,4 +17,5 @@ struct SpyExample void SpyExample::ready() { queryAliases(inputs); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } } diff --git a/gcc/testsuite/g++.dg/template/ptrmem8.C b/gcc/testsuite/g++.dg/template/ptrmem8.C index 8585f835787..d0473f5cc16 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem8.C +++ b/gcc/testsuite/g++.dg/template/ptrmem8.C @@ -11,7 +11,7 @@ struct B struct D : B {}; -template <int (D::*fun)() const> int Get(); // { dg-message "candidate" } +template <int (D::*fun)() const> int Get(); // { dg-message "note" } int main () { diff --git a/gcc/testsuite/g++.dg/template/qualttp5.C b/gcc/testsuite/g++.dg/template/qualttp5.C index c3ebd8c82f6..8bca7f69660 100644 --- a/gcc/testsuite/g++.dg/template/qualttp5.C +++ b/gcc/testsuite/g++.dg/template/qualttp5.C @@ -4,13 +4,14 @@ template <class U> struct A { - template <class T> class B {}; // { dg-message "operator=" } + template <class T> class B {}; // { dg-message "operator=|no known conversion" } }; template <template <class> class TT> void f() { TT<int> y; y = 0; // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } template <class T> struct C diff --git a/gcc/testsuite/g++.dg/template/sfinae2.C b/gcc/testsuite/g++.dg/template/sfinae2.C index 0b11ecc0f02..e39ca6b76aa 100644 --- a/gcc/testsuite/g++.dg/template/sfinae2.C +++ b/gcc/testsuite/g++.dg/template/sfinae2.C @@ -8,10 +8,11 @@ template<int T> struct cl { const static int value = T; }; -template<int I> void fn (char (*) [cl<I>::value] = 0 ); // { dg-message "candidate" } +template<int I> void fn (char (*) [cl<I>::value] = 0 ); // { dg-message "note" } void foo (void) { fn<0> (); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.dg/template/spec22.C b/gcc/testsuite/g++.dg/template/spec22.C index 7e627f16763..f916ea46894 100644 --- a/gcc/testsuite/g++.dg/template/spec22.C +++ b/gcc/testsuite/g++.dg/template/spec22.C @@ -16,6 +16,6 @@ template <typename T> struct srp }; ptr<int> parent_get() { - srp<int> parent; + srp<int> parent; // { dg-message "candidate" } return parent; // { dg-error "is ambiguous" } } diff --git a/gcc/testsuite/g++.dg/template/spec23.C b/gcc/testsuite/g++.dg/template/spec23.C index 1c027fa4388..3d401f00ef9 100644 --- a/gcc/testsuite/g++.dg/template/spec23.C +++ b/gcc/testsuite/g++.dg/template/spec23.C @@ -20,6 +20,7 @@ struct Bar Foo Quux (Bar const &b) { return b; // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.dg/template/ttp25.C b/gcc/testsuite/g++.dg/template/ttp25.C index 23e5a7a7990..861d187d4db 100644 --- a/gcc/testsuite/g++.dg/template/ttp25.C +++ b/gcc/testsuite/g++.dg/template/ttp25.C @@ -18,9 +18,12 @@ void f4(T, C<5>); // { dg-message "note" } template<int N> struct X {}; void g() { f1(5l, X<5>()); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } f2(X<5>(), 5); f3(X<5>(), 5l); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } f4(5, X<5>()); f4(5l, X<5>()); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } f4((short)5, X<5>()); } diff --git a/gcc/testsuite/g++.dg/template/typedef4.C b/gcc/testsuite/g++.dg/template/typedef4.C index 2676d8fec1d..60fad068858 100644 --- a/gcc/testsuite/g++.dg/template/typedef4.C +++ b/gcc/testsuite/g++.dg/template/typedef4.C @@ -6,4 +6,5 @@ template<typedef> void foo(); // { dg-error "no type|typedef declaration|templa void bar() { foo<int>(); // { dg-error "matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.dg/template/unify10.C b/gcc/testsuite/g++.dg/template/unify10.C index 7b19e1ebfe8..8dc434b7577 100644 --- a/gcc/testsuite/g++.dg/template/unify10.C +++ b/gcc/testsuite/g++.dg/template/unify10.C @@ -12,36 +12,48 @@ struct MyClass { }; template<class CLASS> -void mFunction(void (CLASS::* method)()) {} // { dg-message "candidate" } +void mFunction(void (CLASS::* method)()) {} // { dg-message "note" } template<class CLASS> -void cFunction(void (CLASS::* method)() const) {} // { dg-message "candidate" } +void cFunction(void (CLASS::* method)() const) {} // { dg-message "note" } template<class CLASS> -void vFunction(void (CLASS::* method)() volatile) {} // { dg-message "candidate" } +void vFunction(void (CLASS::* method)() volatile) {} // { dg-message "note" } template<class CLASS> -void cvFunction(void (CLASS::* method)() const volatile) {} // { dg-message "candidate" } +void cvFunction(void (CLASS::* method)() const volatile) {} // { dg-message "note" } int main() { mFunction(&MyClass::mMethod); mFunction(&MyClass::cMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } mFunction(&MyClass::vMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 30 } mFunction(&MyClass::cvMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 32 } cFunction(&MyClass::mMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 35 } cFunction(&MyClass::cMethod); cFunction(&MyClass::vMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 38 } cFunction(&MyClass::cvMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 40 } vFunction(&MyClass::mMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 43 } vFunction(&MyClass::cMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 45 } vFunction(&MyClass::vMethod); vFunction(&MyClass::cvMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 48 } cvFunction(&MyClass::mMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 51 } cvFunction(&MyClass::cMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 53 } cvFunction(&MyClass::vMethod); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 55 } cvFunction(&MyClass::cvMethod); return 0; diff --git a/gcc/testsuite/g++.dg/template/unify11.C b/gcc/testsuite/g++.dg/template/unify11.C index a49f5c1b2d0..ed6b31c31c4 100644 --- a/gcc/testsuite/g++.dg/template/unify11.C +++ b/gcc/testsuite/g++.dg/template/unify11.C @@ -8,7 +8,7 @@ struct A template <typename S, typename T, typename U, typename S::v = &S::v::s> typename S::A -foo (S c, T t, U u) // { dg-message "candidate" } +foo (S c, T t, U u) // { dg-message "note" } { } @@ -21,6 +21,7 @@ struct B { A a; A b = foo (this, a, t); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } } } c; B () : c (A ()) diff --git a/gcc/testsuite/g++.dg/template/unify6.C b/gcc/testsuite/g++.dg/template/unify6.C index 4e890fe50b3..b12ecb29b21 100644 --- a/gcc/testsuite/g++.dg/template/unify6.C +++ b/gcc/testsuite/g++.dg/template/unify6.C @@ -8,7 +8,7 @@ template <typename T> void Foo1 (T const *a) {a (1);} // #2 template <typename T> T const *Foo2 (T *); -template <typename T> void Foo3 (T *, T const * = 0); // { dg-message "candidate" } +template <typename T> void Foo3 (T *, T const * = 0); // { dg-message "note" } void Bar () { @@ -19,4 +19,5 @@ void Bar () Foo3 (&Baz); Foo3 (&Baz, &Baz); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } } diff --git a/gcc/testsuite/g++.dg/template/unify7.C b/gcc/testsuite/g++.dg/template/unify7.C index 23f61f3dcca..2bfa56303da 100644 --- a/gcc/testsuite/g++.dg/template/unify7.C +++ b/gcc/testsuite/g++.dg/template/unify7.C @@ -3,7 +3,7 @@ // PR c++/3518 template <typename T> void Foo (const T &); -template <typename T> void Baz (const T (*)()); // { dg-message "candidate" } +template <typename T> void Baz (const T (*)()); // { dg-message "note" } int &f (); @@ -11,4 +11,5 @@ int main() { Foo (f); Baz (f); // { dg-error "no matching function" "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.dg/template/unify9.C b/gcc/testsuite/g++.dg/template/unify9.C index 1e16c432b8a..40f6b9271fc 100644 --- a/gcc/testsuite/g++.dg/template/unify9.C +++ b/gcc/testsuite/g++.dg/template/unify9.C @@ -4,7 +4,7 @@ // Origin:Wolfgang Bangerth <bangerth@dealii.org> // PR 21799: deduction of cvqualifiers on member functions was wrong -template <class T> void f (T &, void (T::*)() ); // { dg-message "candidate" } +template <class T> void f (T &, void (T::*)() ); // { dg-message "note" } struct X { void g() const {} @@ -14,4 +14,5 @@ const X *x; int main () { f (*x, &X::g); // { dg-error "no matching function" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } diff --git a/gcc/testsuite/g++.dg/template/varmod1.C b/gcc/testsuite/g++.dg/template/varmod1.C index c2c51c72173..6ae78d9003f 100644 --- a/gcc/testsuite/g++.dg/template/varmod1.C +++ b/gcc/testsuite/g++.dg/template/varmod1.C @@ -1,10 +1,11 @@ // { dg-options "-w" } -template<typename T> void foo(T); // { dg-message "candidate" } +template<typename T> void foo(T); // { dg-message "note" } void bar() { int i; int A[i][i]; foo(A); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C index a20f074bcd2..89b0a6a6771 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-alloca-1.C @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-global-1.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-global-1.C index 2692f947c7b..cc05ed04f30 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/eh-global-1.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-global-1.C @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-1.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-1.C index 72ac7fd2443..d2555f2e2c9 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-1.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-1.C @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C index 4feb3f09fc7..1cbc68cc493 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-inline-2.C @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C index 74b48faa599..b9ba81b1297 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include <stdarg.h> #include "check.h" diff --git a/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C b/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C index 9aa25b88bc0..5e282179c63 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-2.C @@ -1,5 +1,6 @@ /* { dg-options "-Wno-abi" {target arm_eabi} } */ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include <stdarg.h> #include "check.h" diff --git a/gcc/testsuite/g++.dg/torture/stackalign/throw-1.C b/gcc/testsuite/g++.dg/torture/stackalign/throw-1.C index b1d2e278953..3eddc1d02ab 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/throw-1.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/throw-1.C @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/g++.dg/torture/stackalign/throw-2.C b/gcc/testsuite/g++.dg/torture/stackalign/throw-2.C index 5f3f1dc0737..63a8c6e7c21 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/throw-2.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/throw-2.C @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/g++.dg/torture/stackalign/throw-4.C b/gcc/testsuite/g++.dg/torture/stackalign/throw-4.C index a9c15bd43c9..52e6f7ff7e6 100644 --- a/gcc/testsuite/g++.dg/torture/stackalign/throw-4.C +++ b/gcc/testsuite/g++.dg/torture/stackalign/throw-4.C @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr46734.C b/gcc/testsuite/g++.dg/tree-ssa/pr46734.C new file mode 100644 index 00000000000..e95c6208974 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr46734.C @@ -0,0 +1,34 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fipa-sra" } */ + +struct A +{ + int *p; + A() {p = (int *) -1;} + ~A() {if (p && p != (int *) -1) *p = 0;} +}; + +struct B +{ + A a; + char data[23]; + B() : a() {data[0] = 0;} +}; + +extern A ga; +extern int *gi; +extern void *gz; +extern B *gb; + +static int * __attribute__ ((noinline)) foo (B *b, void *z) +{ + __builtin_memcpy (gz, z, 28); + ga = b->a; + return b->a.p; +} + +int *bar (B *b, void *z) +{ + gb = b; + return foo (b, z); +} diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C index 35d882b21b3..24725c999b0 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15799.C @@ -24,6 +24,7 @@ enum { first, last}; void foo(void) { sanjose obj(first); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } } diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C index 3441ae5bed0..4f6d878e885 100644 --- a/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C +++ b/gcc/testsuite/g++.old-deja/g++.benjamin/15800-1.C @@ -5,7 +5,7 @@ struct panama { panama(); panama(panama &); - panama& operator=(panama&); // { dg-message "candidate is" } + panama& operator=(panama&); // { dg-message "operator=|no known conversion" } }; extern panama dig(); @@ -13,5 +13,6 @@ extern panama dig(); void foo() { panama obj; obj = dig(); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C b/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C index ddf93c4bdae..4706d7e8a71 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/ambiguity1.C @@ -8,10 +8,11 @@ struct B { B (int); }; -void myfunc (const A& t0); // { dg-message "candidates" } +void myfunc (const A& t0); // { dg-message "note" } void myfunc (const B& t0); // { dg-message "note" } int main () { myfunc(1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C index 33be95f2044..38c9d49a19d 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C @@ -8,12 +8,13 @@ union Value struct GlobalAddress // { dg-message "note" } { - GlobalAddress(Value *nvar){} // { dg-message "candidates" } + GlobalAddress(Value *nvar){} // { dg-message "note" } }; int main() { new GlobalAddress(Value()); // internal error occured here// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } //new GlobalAddress(new Value()); // This line is correct code } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C index e7d621cf0a2..fe759406ee1 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C @@ -1,22 +1,24 @@ // { dg-do compile } // GROUPS passed old-abort -class internal { // { dg-message "internal::internal" } +class internal { // { dg-message "internal::internal|candidate expects|no known conversion" } int field; int anotherfield; }; -class bug { // { dg-message "bug::bug" } +class bug { // { dg-message "bug::bug|candidate expects" } internal* numbers; bug(int size); }; -bug::bug(int size) // { dg-message "bug::bug" } +bug::bug(int size) // { dg-message "bug::bug|candidate expects" } { numbers = new internal(size * size);// { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } } int main() { bug test; // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C index 5dc1a874903..ad652cf9358 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C @@ -278,6 +278,7 @@ SetLD<T>::remove(const T& item) Vix x; for (first(x); 0 != x && this->REMOVE_CURRENT != a; next(x, a)) a = operator()(x) == item ? this->REMOVE_CURRENT: this->NORMAL; // { dg-error "" } .* + // { dg-message "candidate" "candidate note" { target *-*-* } 280 } } template<class T> bool @@ -286,6 +287,7 @@ SetLD<T>::contains(const T& item) const Vix x; for (first(x); 0 != x; next(x)) { if (operator()(x) == item)// { dg-error "" } .* + // { dg-message "candidate" "candidate note" { target *-*-* } 289 } return TRUE; } return FALSE; @@ -343,7 +345,7 @@ operator>=(const SetLD<T>& a, const SetLD<T>& b) class String { }; class IcaseString: public String { }; template <> class SetLD< IcaseString >: public SetLD< String > { public: SetLD (): SetLD< String >() { }; SetLD (const ::ListD< IcaseString >& other): SetLD< String >() { ::ListD< IcaseString >::Vix x; for (other.first(x); 0 != x; other.next(x)) add(other(x)); }; SetLD (const SetLD & other): SetLD< String >(other) { }; const IcaseString & operator()(const Vix& x) const { return ( IcaseString &) SetLD< String >::operator()(x); } }; typedef SetLD< String > SetLD_String_IcaseString_old_tmp99; typedef SetLD< IcaseString > SetLD_String_IcaseString_new_tmp99; -inline int operator== (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) // { dg-message "operator==" } +inline int operator== (const SetLD_String_IcaseString_new_tmp99& a, const SetLD_String_IcaseString_new_tmp99& b) // { dg-message "operator==|no known conversion" } { const SetLD_String_IcaseString_old_tmp99& oa = a; const SetLD_String_IcaseString_old_tmp99& ob = b; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C b/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C index e77c437a6d0..8be5d6ed333 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/cvt3.C @@ -38,11 +38,12 @@ struct bar class nnyacc { public: - static void assign(void*& lval, void*& rval); // { dg-message "candidate is" } + static void assign(void*& lval, void*& rval); // { dg-message "nnyacc::assign|no known conversion" } }; void foo (bar yylval, bar *yyvsp) { nnyacc::assign(yylval.valueList, yyvsp[0].valueList);// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 47 } } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C index 328bcdfe2ce..1b9415b0ed0 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload1.C @@ -9,7 +9,7 @@ public: class Bar : public Foo { public: - int f (int); // { dg-message "candidate is" } + int f (int); // { dg-message "Bar::f|candidate expects" } }; int main () @@ -17,5 +17,6 @@ int main () Bar b; b.f ();// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } b.f (10); } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C index 7a1941cac4e..6206d0b9eb1 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload4.C @@ -5,7 +5,7 @@ class B { public: - static void WantsNew (NewObject creator); // { dg-message "candidate is" } + static void WantsNew (NewObject creator); // { dg-message "B::WantsNew|no known conversion" } }; class A @@ -19,5 +19,6 @@ // This used to die in convert_harshness_{ansi,old} cuz it // didn't know what to do about a void type. B::WantsNew ( A::NewOne );// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } } }; diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C b/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C index b168e860410..b24a1f6479f 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/overload9.C @@ -1,13 +1,13 @@ // { dg-do assemble } // GROUPS passed overloading -class CLogger +class CLogger // { dg-message "candidate" } { public: - void operator() (int,const char *) {}; // { dg-message "candidates" } + void operator() (int,const char *) {}; // { dg-message "note" } void operator() (int,const char *, ...) {}; // { dg-message "note" } } Log; -class CGLogger : public CLogger +class CGLogger : public CLogger // { dg-message "candidate" } { } GLog; diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C b/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C index 1c315b7fadd..a066d584880 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C @@ -21,6 +21,7 @@ void bar (f_ptr_t2); // { dg-message "note" } void function () { bar (foo); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } } int main () { return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C b/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C index 4290144f89f..3d8625e5c8d 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900205_04.C @@ -24,6 +24,7 @@ struct0::struct0 (int, void *) // { dg-message "note" } } struct struct0_derived_struct_0 : public struct0 { // { dg-error "no matching|deleted" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } }; struct0_derived_struct_0 object; // { dg-message "synthesized|deleted" } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C index 5038f23b16c..cad19a2c305 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900330_02.C @@ -19,12 +19,13 @@ struct B { }; struct D : public B { - int f(struct B); // { dg-message "candidate is" } referred to below + int f(struct B); // { dg-message "D::f|no known conversion" } referred to below }; void h(D* pd) { pd->f(1); // { dg-error "no matching" } D::f(struct B) hides B::f(int) + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } } int main () { return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C index 6f7ea3f4581..7e2829f7b09 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C @@ -23,6 +23,7 @@ char c; void test () { function0 (c,c); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 25 } } int main () { return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C index c06cef18380..30c2603a732 100644 --- a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C @@ -29,7 +29,7 @@ struct t_0_st_0 { operator t_0_st_1 ();// { dg-message "note" } }; -t_0_st_0 t_0_st_0_obj0; +t_0_st_0 t_0_st_0_obj0; // { dg-message "candidate" } void t_0_assignment () { @@ -54,7 +54,7 @@ struct t_1_st_1 { t_1_st_1 (t_1_st_0&); // { dg-message "note" } t_1_st_1 (); - void operator= (t_1_st_1&); // { dg-message "note" } + void operator= (t_1_st_1&); // { dg-message "operator=|no known conversion" } }; struct t_1_st_0 { @@ -63,7 +63,7 @@ struct t_1_st_0 { operator t_1_st_1 (); // { dg-message "note" } }; -t_1_st_0 t_1_st_0_obj0; +t_1_st_0 t_1_st_0_obj0; // { dg-message "candidate" } void t_1_assignment () { @@ -72,7 +72,9 @@ void t_1_assignment () t_1_st_1 t_1_st_1_obj2; t_1_st_1_obj0 = t_1_st_0_obj0; // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 74 } t_1_st_1_obj1 = t_1_st_1 (t_1_st_0_obj0); // { dg-error "no match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 76 } } void t_1_local_init () @@ -93,10 +95,10 @@ struct t_2_st_1 { // { dg-error "initializing" } struct t_2_st_0 { int member; - operator t_2_st_1 (); // { dg-message "candidate" } + operator t_2_st_1 (); // { dg-message "note" } }; -t_2_st_0 t_2_st_0_obj0; +t_2_st_0 t_2_st_0_obj0; // { dg-message "candidate" } void t_2_assignment () { diff --git a/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C b/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C index 1cd71c4d82a..0e7218f0c8f 100644 --- a/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C +++ b/gcc/testsuite/g++.old-deja/g++.eh/ctor1.C @@ -1,8 +1,8 @@ // { dg-do assemble } struct A { - A(); // { dg-message "" } candidate - A(A&); // { dg-message "candidates" } referenced below + A(); // { dg-message "A::A|candidate expects" } candidate + A(A&); // { dg-message "A::A|no known conversion" } referenced below }; int @@ -11,6 +11,7 @@ main () try { throw A(); // { dg-error "no matching" "match" } can't copy + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } // { dg-error "thrown expression" "expr" { target *-*-* } 13 } } catch (...) { } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C index 1e64693d804..607cf9cc841 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C @@ -14,7 +14,7 @@ public: class Something { public: - void DoSomething(Ding A); // { dg-message "candidate is" } referred to + void DoSomething(Ding A); // { dg-message "Something::DoSomething|no known conversion" } referred to }; void DoSomething(Ding A); @@ -23,5 +23,7 @@ void foo(Something* pX) { DoSomething(1); // { dg-error "conversion" } pX->DoSomething(1); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 25 } (*pX).DoSomething(1); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C index e94cc7c9781..9dcf6368aad 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C @@ -10,4 +10,5 @@ struct Node // { dg-message "note" } void bug(int i) { Node* q = new Node(i); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload16.C b/gcc/testsuite/g++.old-deja/g++.jason/overload16.C index 455376fc881..fba33eda70d 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload16.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/overload16.C @@ -1,7 +1,8 @@ // { dg-do assemble } -void f (int); // { dg-message "candidates" } +void f (int); // { dg-message "note" } void f (long); // { dg-message "note" } int main() { f (1 & 0xffffff00UL); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 6 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload28.C b/gcc/testsuite/g++.old-deja/g++.jason/overload28.C index 46bf918d047..fe0dae1031f 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload28.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/overload28.C @@ -9,4 +9,5 @@ struct Foo { int main() { Foo* f1 = new Foo(); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 11 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C index bc14974acca..a1b563297fc 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/scoping10.C @@ -3,13 +3,14 @@ void f (char *); struct A { - void f (); // { dg-message "candidate is" } referred to + void f (); // { dg-message "A::f|candidate expects" } referred to }; struct B : public A { void g (char *); void h () { extern void g (); // { dg-message "" } f("foo"); // { dg-error "" } hidden + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } g("foo"); // { dg-error "" } hidden } }; diff --git a/gcc/testsuite/g++.old-deja/g++.jason/template30.C b/gcc/testsuite/g++.old-deja/g++.jason/template30.C index e5d194012ea..9414c06cee2 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/template30.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/template30.C @@ -1,6 +1,6 @@ // { dg-do assemble } template <class T, class U> -int func(U, T); // { dg-message "candidates" } +int func(U, T); // { dg-message "note" } template <class T, class U> int func(T, U) // { dg-message "note" } @@ -11,4 +11,5 @@ int func(T, U) // { dg-message "note" } int main () { func (0, 1); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C index efd09fd06b1..da216ae5cc7 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C @@ -13,5 +13,7 @@ X foo() { X x; return x; } int main() { X x(foo()); // { dg-error "no match" } Compiler doesn't warn about temporary reference. + // { dg-message "candidate" "candidate note" { target *-*-* } 15 } x.bar(foo()); // { dg-error "no match" } The same mistake is warned about in this case. + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/arg1.C b/gcc/testsuite/g++.old-deja/g++.law/arg1.C index 8b117aa8916..3fc42bccc1b 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arg1.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arg1.C @@ -9,13 +9,13 @@ // check the order of declarations class A { public: - void f(double* p) { std::cout << "A(double*)\n"; } // { dg-message "candidates" } + void f(double* p) { std::cout << "A(double*)\n"; } // { dg-message "note" } void f(int* p) { std::cout << "A(int*)\n"; } // { dg-message "note" } }; class B { public: - void f(int* p) { std::cout << "B(int*)\n"; } // { dg-message "candidates" } + void f(int* p) { std::cout << "B(int*)\n"; } // { dg-message "note" } void f(double* p) { std::cout << "B(double*)\n"; } // { dg-message "note" } }; @@ -25,6 +25,8 @@ int main() B b; a.f(0);// { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } b.f(0);// { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 29 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/arg11.C b/gcc/testsuite/g++.old-deja/g++.law/arg11.C index 01331535ee2..fc590c4387a 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arg11.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arg11.C @@ -9,7 +9,7 @@ struct String { String(const char*); }; struct Ack { Ack(String); }; -struct S { void method(Ack); }; // { dg-message "candidate is" } referenced below +struct S { void method(Ack); }; // { dg-message "S::method|no known conversion" } referenced below void function(Ack); @@ -18,5 +18,6 @@ foo(S *o) { // Neither call has a usable constructor for conversions of char[5] to Ack. function("adsf");// { dg-error "conversion" } o->method("adsf");// { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm9.C b/gcc/testsuite/g++.old-deja/g++.law/arm9.C index b8128c6f686..979ef808820 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arm9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arm9.C @@ -19,11 +19,12 @@ class B : public A { public: void set (f2 f); }; -void B::set (f2 f) { std::cout << "called B\n";} // { dg-message "candidate is" } +void B::set (f2 f) { std::cout << "called B\n|no known conversion";} // { dg-message "B::set|no known conversion" } int main() { B b; b.set(F1); // ARM page 309: should call A.set(f1) and that what g++ does,// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } // but 13.1 of ARM clearly states that it should call B::set() // or generate an error because overloading works only for // functions within the same scope (first page of chapter 13) diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors11.C b/gcc/testsuite/g++.old-deja/g++.law/ctors11.C index 39ee76b0ae7..c8b59b67926 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors11.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors11.C @@ -18,4 +18,5 @@ public: int main() { B(10);// { dg-error "match" } B doesn't have a constructor taking int + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors17.C b/gcc/testsuite/g++.old-deja/g++.law/ctors17.C index 0d61c49abd7..071a36008f8 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors17.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors17.C @@ -20,4 +20,5 @@ int main() X *y = new X(10, "123"); // the compiler must reject this constructor call: X *x = new X("abc");// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C index 7b2c782b30b..1776be949bb 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors5.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors5.C @@ -5,7 +5,7 @@ // Subject: bug in handling static const object of the enclosing class // Date: Tue, 1 Sep 92 10:38:44 EDT -class X // { dg-message "7:X::X" } implicit constructor +class X // { dg-message "7:X::X|candidate expects" } implicit constructor { private: int x; @@ -23,7 +23,7 @@ class Y // { dg-error "1:new types may not be defined in a return type" "err" } Y(); } X::X( int xi ) // { dg-error "14:return type specification for constructor invalid" "err" } -// { dg-message "1:candidates are: X::X\\(int\\)" "note" { target *-*-* } 25 } +// { dg-message "1:X::X|candidate expects" "match candidate text" { target *-*-* } 25 } { x = xi; } @@ -31,6 +31,7 @@ X::X( int xi ) // { dg-error "14:return type specification for constructor inval const X X::x0( 0 ); Y::Y() // { dg-error "6:no matching function for call to 'X::X\\(\\)'" } +// { dg-message "candidate" "candidate note" { target *-*-* } 33 } { xx = X::x0; } diff --git a/gcc/testsuite/g++.old-deja/g++.law/ctors9.C b/gcc/testsuite/g++.old-deja/g++.law/ctors9.C index 43ba1262c95..d94495a253e 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/ctors9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/ctors9.C @@ -33,6 +33,7 @@ int blort(Foo& f) int main() { var_Foo b(2);// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 35 } b->a = 0; int x = blort(b); return x; diff --git a/gcc/testsuite/g++.old-deja/g++.law/enum4.C b/gcc/testsuite/g++.old-deja/g++.law/enum4.C index 37836595b2f..6695061210d 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/enum4.C +++ b/gcc/testsuite/g++.old-deja/g++.law/enum4.C @@ -11,7 +11,7 @@ enum Enum {enumerator1, enumerator2}; struct Struct { int i; - int getI(Enum) {return i;} // { dg-message "candidate is" } + int getI(Enum) {return i;} // { dg-message "Struct::getI|no known conversion" } }; int funct (Enum) @@ -25,5 +25,6 @@ int main() Struct s; int x = funct(e+1);// { dg-error "invalid" } int y = s.getI(e+1);// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } return x+y; } diff --git a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C index 5f1187a592b..7d058fd896e 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C +++ b/gcc/testsuite/g++.old-deja/g++.law/missed-error2.C @@ -14,7 +14,7 @@ #undef max #endif -inline int max(int a, int b) {return a > b ? a : b;}; // { dg-message "candidate" } +inline int max(int a, int b) {return a > b ? a : b;}; // { dg-message "note" } // { dg-error "extra ';'" "extra ;" { target *-*-* } 17 } inline double max(double a, double b) {return a > b ? a : b;}; // { dg-message "note" } candidate // { dg-error "extra ';'" "extra ;" { target *-*-* } 19 } @@ -32,5 +32,6 @@ static void foo(int i, int j, double x, double y) { std::cout << "Max(int): " << max(i,j) << " Max(double): " << max(x,y) << '\n'; std::cout << "Max(int, double): " << max(i, y) << '\n';// { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 34 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators32.C b/gcc/testsuite/g++.old-deja/g++.law/operators32.C index 8d5372c6c30..20d148dd544 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/operators32.C +++ b/gcc/testsuite/g++.old-deja/g++.law/operators32.C @@ -7,7 +7,7 @@ // template <class T> -void ffree(long rows, T** array) // { dg-message "candidate" } +void ffree(long rows, T** array) // { dg-message "note" } { for( long i = 0; i < rows; i++ ) delete [] array[i]; // delete row @@ -50,6 +50,8 @@ foo() {std::cout << "foo created" << std::endl; } foo **f2; allocate2d(d1, d2, f2);// { dg-error "" } type.*// ERROR - trying to.* +// { dg-message "candidate" "candidate note" { target *-*-* } 52 } ffree(d1, f2);// { dg-error "" } type.*// ERROR - trying to.* +// { dg-message "candidate" "candidate note" { target *-*-* } 54 } } diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators9.C b/gcc/testsuite/g++.old-deja/g++.law/operators9.C index d00c707c915..3c50cbdd0e7 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/operators9.C +++ b/gcc/testsuite/g++.old-deja/g++.law/operators9.C @@ -10,11 +10,12 @@ class B { public: operator=(B &); // { dg-error "no type" } - // { dg-message "candidate is" "note" { target *-*-* } 12 } + // { dg-message "B::operator=|no known conversion" "note" { target *-*-* } 12 } }; void test(B &b1, const B &b2) { b1 = b2;// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 19 } } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net2.C b/gcc/testsuite/g++.old-deja/g++.mike/net2.C index f2240ddfc18..dfc57e149aa 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/net2.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/net2.C @@ -11,3 +11,4 @@ class A { // { dg-message "note" } copy ctor candidate }; A a(0); // { dg-error "ambiguous" } +// { dg-message "candidate" "candidate note" { target *-*-* } 13 } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net22.C b/gcc/testsuite/g++.old-deja/g++.mike/net22.C index e5e1cb1081d..604aef9bcc0 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/net22.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/net22.C @@ -10,5 +10,6 @@ class Child : public Parent { // { dg-message "note" } called int main() { Child c( "String initializer" ); // { dg-error "match" } bad + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C index e234d57c323..7e3a1ffa335 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C @@ -6,7 +6,7 @@ class data; class conatiner { public: virtual void* first (); - virtual data* contents (void* i); // { dg-message "candidate is" } + virtual data* contents (void* i); // { dg-message "conatiner::contents|no known conversion" } }; class user { @@ -18,4 +18,5 @@ private: data* user::data1() const { return (_c.contents (_c.first)); // { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p1989.C b/gcc/testsuite/g++.old-deja/g++.mike/p1989.C index c8664390b4a..487f609a145 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p1989.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p1989.C @@ -197,6 +197,7 @@ List_DLS<T>::search(const T& item) const { for (Pix x=this->first(); 0 != x; this->next(x)) { if (item == this->operator()(x)) // { dg-error "match" } const subversion + // { dg-message "candidate" "candidate note" { target *-*-* } 199 } return x; } return 0; @@ -485,7 +486,7 @@ class STRLIdentifier { char buf[10]; }; -extern int operator==(vertex<STRLIdentifier*>&, vertex<STRLIdentifier*>&); // { dg-message "candidates" } const subversion +extern int operator==(vertex<STRLIdentifier*>&, vertex<STRLIdentifier*>&); // { dg-message "note" } const subversion extern int operator==(STRLIdentifier&, STRLIdentifier&); // { dg-message "note" } fn ref in err msg extern int x(List_DLSp<STRLIdentifier *>); diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p2431.C b/gcc/testsuite/g++.old-deja/g++.mike/p2431.C index 0bb2648215a..4e74899a1d8 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p2431.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p2431.C @@ -3,7 +3,7 @@ class A { public: - A(A &); // { dg-message "candidate is" } + A(A &); // { dg-message "note" } }; class B @@ -19,5 +19,6 @@ class C { B b; A a = b;// { dg-error "match" } + // { dg-message "candidate" "candidate note" { target *-*-* } 21 } } }; diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p438.C b/gcc/testsuite/g++.old-deja/g++.mike/p438.C index 16dc628b613..6e78af16515 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p438.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p438.C @@ -12,7 +12,7 @@ class C class D { public: - void a(C& b); // { dg-message "candidate is" } + void a(C& b); // { dg-message "D::a|no known conversion" } }; void C::test() const @@ -20,4 +20,5 @@ void C::test() const D d; d.a(*this); // { dg-error "match" } *this is const, so should get error + // { dg-message "candidate" "candidate note" { target *-*-* } 22 } } diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p807a.C b/gcc/testsuite/g++.old-deja/g++.mike/p807a.C index 83879bd7390..04c9c4867e9 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p807a.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p807a.C @@ -15,8 +15,8 @@ public: class B { public: - operator A(); // { dg-message "candidates" } fn ref in err msg + operator A(); // { dg-message "note" } fn ref in err msg }; -B b; +B b; // { dg-message "candidate" } A a = b; // { dg-error "ambiguous" } should fail as it is ambigious. diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p9068.C b/gcc/testsuite/g++.old-deja/g++.mike/p9068.C index ff5454b2289..2c62f5c79ab 100644 --- a/gcc/testsuite/g++.old-deja/g++.mike/p9068.C +++ b/gcc/testsuite/g++.old-deja/g++.mike/p9068.C @@ -2,7 +2,7 @@ // prms-id: 9068 struct ostream { - void operator<< (int); // { dg-message "candidate is" } fn ref in err msg + void operator<< (int); // { dg-message "operator|no known conversion" } fn ref in err msg }; class C { @@ -14,6 +14,7 @@ public: void foo (ostream& lhs, const C& rhs) { lhs << rhs.i; // { dg-error "match" } no such i for any opr << () + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } } int& C::i () { diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t120.C b/gcc/testsuite/g++.old-deja/g++.niklas/t120.C index bef06655220..7a54e051b1e 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t120.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t120.C @@ -3,4 +3,4 @@ typedef void (*T) (...); void f (); struct S { void g (T); void h() { g(f); } };// { dg-error "match" "match" } -// { dg-message "candidate is" "note" { target *-*-* } 5 } +// { dg-message "candidate|S::g|no known conversion" "match candidate text" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t121.C b/gcc/testsuite/g++.old-deja/g++.niklas/t121.C index 4510a280312..b0c9253da84 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t121.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t121.C @@ -3,4 +3,4 @@ void f (); void g1 (void (*) (...)); void h1 () { g1 (f); }// { dg-error "invalid conversion" } struct S { void g2 (void (*) (...)); void h2 () { g2 (f); } };// { dg-error "match" "match" } -// { dg-message "candidate is" "note" { target *-*-* } 5 } +// { dg-message "candidate|S::g2|no known conversion" "match candidate text" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.niklas/t128.C b/gcc/testsuite/g++.old-deja/g++.niklas/t128.C index 19e3ca1dab0..cf0a4f71b8e 100644 --- a/gcc/testsuite/g++.old-deja/g++.niklas/t128.C +++ b/gcc/testsuite/g++.old-deja/g++.niklas/t128.C @@ -3,3 +3,4 @@ struct A { A (int); }; struct B : A {}; // { dg-message "note" } without ctor // ERROR - candidates void f () { B (0); }// { dg-error "match" } .* +// { dg-message "candidate" "candidate note" { target *-*-* } 5 } diff --git a/gcc/testsuite/g++.old-deja/g++.ns/overload2.C b/gcc/testsuite/g++.old-deja/g++.ns/overload2.C index 85df6bd694b..facfa3f5698 100644 --- a/gcc/testsuite/g++.old-deja/g++.ns/overload2.C +++ b/gcc/testsuite/g++.old-deja/g++.ns/overload2.C @@ -10,4 +10,5 @@ void f(); // { dg-message "note" } void g() { f(); // { dg-error "ambiguous" } ambiguous, ::f or A::f ? + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } } diff --git a/gcc/testsuite/g++.old-deja/g++.ns/using12.C b/gcc/testsuite/g++.old-deja/g++.ns/using12.C index c3425c7f290..343cfefc459 100644 --- a/gcc/testsuite/g++.old-deja/g++.ns/using12.C +++ b/gcc/testsuite/g++.old-deja/g++.ns/using12.C @@ -3,7 +3,7 @@ namespace foo { - void x (bool); // { dg-message "candidates" } + void x (bool); // { dg-message "note" } void x (char); // { dg-message "note" } candidates void x (int); // { dg-message "note" } candidates void x (double); // { dg-message "note" } candidates @@ -16,4 +16,5 @@ void fn (int i) using foo::x; using baz::x; x(i); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } } diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash24.C b/gcc/testsuite/g++.old-deja/g++.other/crash24.C index a49ce56b1aa..b1fa01c9b49 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/crash24.C +++ b/gcc/testsuite/g++.old-deja/g++.other/crash24.C @@ -7,11 +7,12 @@ class foo { friend class __iterator; typedef __iterator const_iterator; virtual ~foo() { } - __iterator begin(); // { dg-message "candidate is" } + __iterator begin(); // { dg-message "foo::begin|no known conversion for implicit" } }; static void iteratorTest(const foo &x) { foo::const_iterator i = x.begin(); // { dg-error "incomplete type" "incomplete type" } + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } // { dg-error "no matching" "no matching" { target *-*-* } 14 } for (; i; ++i) *i; diff --git a/gcc/testsuite/g++.old-deja/g++.other/expr1.C b/gcc/testsuite/g++.old-deja/g++.other/expr1.C index 485594dfbe3..87166f0ae2d 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/expr1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/expr1.C @@ -2,8 +2,8 @@ // Simplified from bug report by Trevor Taylor <ttaylor@powerup.com.au> -struct T { - int operator()(int) { } // { dg-message "candidate is" } +struct T { // { dg-message "candidate" } + int operator()(int) { } // { dg-message "operator|candidate expects" } }; int main() { diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload11.C b/gcc/testsuite/g++.old-deja/g++.other/overload11.C index e8c88fd58ec..b994b80701a 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/overload11.C +++ b/gcc/testsuite/g++.old-deja/g++.other/overload11.C @@ -21,10 +21,8 @@ // sure that doesn't happen again. -void ovl (int); // { dg-error "" } candidate -// { dg-message "int" "int" { target *-*-* } 24 } -void ovl (float); // { dg-error "" } candidate -// { dg-message "float" "float" { target *-*-* } 26 } +void ovl (int); // { dg-message "ovl|candidate expects" } candidate +void ovl (float); // { dg-message "ovl|candidate expects" } candidate void fn (int); void fna (int); @@ -36,6 +34,7 @@ int main (int argc, char **argv) (ovl) (1); // ok (&ovl) (1); // { dg-error "" } not suitable for overload resolution (ovl) (); // { dg-error "" } no matching candidates + // { dg-message "candidate" "candidate note" { target *-*-* } 36 } (&ovl) (); // { dg-error "" } not suitable for overload resolution // 13.3.1.1 indicates that the following are errors -- the primary expression diff --git a/gcc/testsuite/g++.old-deja/g++.other/pmf3.C b/gcc/testsuite/g++.old-deja/g++.other/pmf3.C index f43ed65ef2a..11e648ed86e 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/pmf3.C +++ b/gcc/testsuite/g++.old-deja/g++.other/pmf3.C @@ -3,7 +3,7 @@ // Bug: g++ was crashing after giving errors. template<class T> - void connect_to_method( // { dg-message "candidate is" } + void connect_to_method( // { dg-message "connect_to_method|no known conversion" } T *receiver, void (T::*method)()) {} @@ -21,5 +21,6 @@ public: Gtk_Base::Gtk_Base() { connect_to_method(this,&show); // { dg-error "no match" } invalid pmf expression + // { dg-message "candidate" "candidate note" { target *-*-* } 23 } connect_to_method(this,&expose); // { dg-error "pointer to member" } invalid pmf expression } diff --git a/gcc/testsuite/g++.old-deja/g++.other/volatile1.C b/gcc/testsuite/g++.old-deja/g++.other/volatile1.C index 5c587287036..ca28ec8e443 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/volatile1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/volatile1.C @@ -16,5 +16,6 @@ int main(void) { volatile f_class vf; 0 ? ret_v_f_class() : vf; // { dg-error "match" } can't copy volatile lvalue + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C b/gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C index 3a587d8738e..ecfa4de18f9 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/auto_ptr.C @@ -30,7 +30,7 @@ template<typename X> struct auto_ptr { X* release() throw() { X* p=px; px=0; return p; } void reset(X* p=0) throw() { if (px != p) delete px, px = p; } - auto_ptr(auto_ptr_ref<X> r) throw() : px(r.py) {} // { dg-message "candidate" } + auto_ptr(auto_ptr_ref<X> r) throw() : px(r.py) {} // { dg-message "note" } template<typename Y> operator auto_ptr_ref<Y>() throw() { return auto_ptr_ref<Y>(release()); } @@ -52,4 +52,5 @@ int main() { x = y; g(f()); h(f()); // { dg-error "match" "match" } no usable copy ctor + // { dg-message "candidate" "candidate note" { target *-*-* } 54 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash28.C b/gcc/testsuite/g++.old-deja/g++.pt/crash28.C index 23d0d2c76bd..2cfed93084d 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/crash28.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash28.C @@ -2,7 +2,7 @@ // { dg-options "" } template <class ARRY> -inline unsigned int asize(ARRY &a) // { dg-message "candidate" } +inline unsigned int asize(ARRY &a) // { dg-message "note" } { return sizeof(a) / sizeof(a[0]); } @@ -11,4 +11,5 @@ void f(unsigned int n) { int x[n]; asize(x); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 13 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash60.C b/gcc/testsuite/g++.old-deja/g++.pt/crash60.C index fb9ca3cf121..1aad62132e1 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/crash60.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash60.C @@ -7,7 +7,7 @@ template< typename SID, class SDR > void k( SID sid, SDR* p, void (SDR::*) - ( typename SID::T ) ); // { dg-message "candidate" } + ( typename SID::T ) ); // { dg-message "note" } struct E { }; struct S { void f( int ); }; @@ -15,4 +15,5 @@ struct S { void f( int ); }; void f() { k( E(), (S*)0, &S::f ); // { dg-error "" } no match + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C index 35540240b93..1831e45a355 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C @@ -1,8 +1,9 @@ // { dg-do assemble } template <int I> -void f(int j); // { dg-message "candidate" } +void f(int j); // { dg-message "note" } void g() { f<7, 12>(3); // { dg-error "" } no matching function. + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C index 70c72d003ed..995d8c0750b 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C @@ -1,8 +1,9 @@ // { dg-do assemble } template <class T> -void f(int i); // { dg-message "candidate" } +void f(int i); // { dg-message "note" } void g() { f<7>(3); // { dg-error "" } no matching function. + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C index e04e814dcaa..560370a8b48 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C @@ -1,9 +1,10 @@ // { dg-do assemble } template <int I> -void f(int i); // { dg-message "candidate" } +void f(int i); // { dg-message "note" } void g() { int i; f<i>(7); // { dg-error "" } template argument 1 is invalid. + // { dg-message "candidate" "candidate note" { target *-*-* } 8 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C index 534309f0c98..c0863a072a1 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C @@ -16,6 +16,8 @@ void foo(); // { dg-message "note" } void bar() { foo<S::f>(); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } foo<g>(); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C index 0df1f46dbdc..1213a1511d3 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C @@ -7,7 +7,7 @@ template <int I, int J> struct S<I, J, 2> : public S<I, I, I>, S<J, J, J> {}; template <int I, int J, int K> -void f(S<I, J, K>, S<I, I, I>); // { dg-message "candidate" } +void f(S<I, J, K>, S<I, I, I>); // { dg-message "note" } void g() { S<0, 0, 0> s0; @@ -15,4 +15,5 @@ void g() { f<0>(s0, s2); f(s0, s2); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/expr2.C b/gcc/testsuite/g++.old-deja/g++.pt/expr2.C index 881b906704b..0dcc65f6fac 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/expr2.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/expr2.C @@ -4,9 +4,10 @@ template <int I> struct S {}; template <int J> -void foo(S<J + 2>); // { dg-message "candidate" } +void foo(S<J + 2>); // { dg-message "note" } void bar() { foo(S<3>()); // { dg-error "" } no way to deduce J from this. + // { dg-message "candidate" "candidate note" { target *-*-* } 11 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C index 015566f96a4..6d61079b4c2 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem10.C @@ -15,13 +15,14 @@ struct A void baz (); }; -template <typename T> void foo (int (*)(T)); // { dg-message "candidate" } +template <typename T> void foo (int (*)(T)); // { dg-message "note" } template <typename T> void foo (int (A::*)(T)); // { dg-message "note" } candidate void A::baz () { foo (&A::f); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 24 } foo (A::f); foo (&(A::f)); foo (f); diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C index 51c5536c7d1..85d3e7378ca 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C @@ -13,22 +13,30 @@ public: }; template <void (A::*)() > -void g() {} // { dg-message "candidate" } +void g() {} // { dg-message "note" } template <int A::*> -void h() {} // { dg-message "candidate" } +void h() {} // { dg-message "note" } int main() { g<&A::f>(); h<&A::i>(); g<&B::f>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 24 } h<&B::j>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } g<(void (A::*)()) &A::f>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } h<(int A::*) &A::i>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 30 } g<(void (A::*)()) &B::f>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 32 } h<(int A::*) &B::j>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 34 } g<(void (A::*)()) 0>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 36 } h<(int A::*) 0>(); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 38 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec35.C b/gcc/testsuite/g++.old-deja/g++.pt/spec35.C index a7e5ea252a9..fc5d5262b55 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/spec35.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec35.C @@ -8,24 +8,28 @@ extern "C" int puts (char const *); -template <typename T> int Foo (T); // { dg-message "candidate" } +template <typename T> int Foo (T); // { dg-message "note" } template <typename T> int Foo (T &); // { dg-message "note" } candidate -template <typename T> int Qux (T); // { dg-message "candidate" } +template <typename T> int Qux (T); // { dg-message "note" } template <typename T> int Qux (T const &); // { dg-message "note" } candidate -template <typename T> int Bar (T const *const &); // { dg-message "candidate" } +template <typename T> int Bar (T const *const &); // { dg-message "note" } template <typename T> int Bar (T *const &); // { dg-message "note" } candidate template <typename T> int Bar (T *); // { dg-message "note" } candidate -template <typename T> int Baz (T *const &); // { dg-message "candidate" } +template <typename T> int Baz (T *const &); // { dg-message "note" } template <typename T> int Baz (T *); // { dg-message "note" } candidate int Baz (int const *ptr, int *ptr2) { Baz (ptr2); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } Bar (ptr2); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } Foo (ptr2); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 30 } Qux (ptr2); // { dg-error "ambiguous" } + // { dg-message "candidate" "candidate note" { target *-*-* } 32 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec5.C b/gcc/testsuite/g++.old-deja/g++.pt/spec5.C index 9aee75fdb21..df7112ad0d0 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/spec5.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec5.C @@ -1,20 +1,22 @@ // { dg-do assemble } template <class T> -void f(T t1, T t2); // { dg-message "candidate" } +void f(T t1, T t2); // { dg-message "note" } template <> void f(int i, int j); template <class T> -void g(T t1, T t2) {} // { dg-message "candidate" } +void g(T t1, T t2) {} // { dg-message "note" } template void g(int i, int j); void h() { f(3, 'c'); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 16 } g(3, 'c'); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C index 765dd8e7583..fc19c3cf535 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C @@ -3,7 +3,7 @@ struct S1 { template <class T> - void f(T t1, T t2); // { dg-message "candidate" } + void f(T t1, T t2); // { dg-message "note" } }; @@ -14,7 +14,7 @@ template <class U> struct S2 { template <class T> - void f(T t1, T t2); // { dg-message "candidate" } + void f(T t1, T t2); // { dg-message "note" } }; template <> @@ -25,7 +25,9 @@ void h() { S1 s1; s1.f(3, 'c'); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 27 } S2<char> s2; s2.f(3, 'c'); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 31 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t05.C b/gcc/testsuite/g++.old-deja/g++.pt/t05.C index 38488d2c0ac..bf4f1ea8d25 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/t05.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/t05.C @@ -3,7 +3,8 @@ template <class A> class B { // { dg-message "note" } A a; public: - B(A&aa); // { dg-message "candidates" } + B(A&aa); // { dg-message "note" } ~B(); }; static B<int> b_int (3); // { dg-error "no matching function" } +// { dg-message "candidate" "candidate note" { target *-*-* } 9 } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t24.C b/gcc/testsuite/g++.old-deja/g++.pt/t24.C index fe6281b9ca2..77d1c990950 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/t24.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/t24.C @@ -1,8 +1,9 @@ // { dg-do assemble } // { dg-options "" } -template <class X> int f (X x, X y) { return 23; } // { dg-message "candidate" } +template <class X> int f (X x, X y) { return 23; } // { dg-message "note" } int foo () { return f (7); // { dg-error "" } + // { dg-message "candidate" "candidate note" { target *-*-* } 7 } } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify4.C b/gcc/testsuite/g++.old-deja/g++.pt/unify4.C index 51bfaf48775..6dd9961088d 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify4.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify4.C @@ -1,5 +1,5 @@ // { dg-do assemble } -template <class T> void f (T); // { dg-message "candidate" } +template <class T> void f (T); // { dg-message "note" } void g (); void g (int); @@ -8,5 +8,6 @@ int main () { f (g); // { dg-error "" } ambiguous unification + // { dg-message "candidate" "candidate note" { target *-*-* } 10 } return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify6.C b/gcc/testsuite/g++.old-deja/g++.pt/unify6.C index 18a0553133d..0e5c0349544 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify6.C @@ -19,12 +19,14 @@ template<> void fn<int &>() {} // ok, specialize A template<> void fn<void ()>() {} // ok, specialize A // now make sure we moan when we really should -template<class T> void foo(T const *){} // { dg-message "candidate" } +template<class T> void foo(T const *){} // { dg-message "note" } void f() { foo<int &>(); // { dg-error "" } attempt to build int & const * + // { dg-message "candidate" "candidate note" { target *-*-* } 26 } foo<void ()>(); // { dg-error "" } attempt to build void (const *)() + // { dg-message "candidate" "candidate note" { target *-*-* } 28 } } typedef void (*Fptr)(); diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C index a0cb738956d..320926092f0 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C @@ -8,7 +8,7 @@ // overload resolution. -template <typename T> void Foo (T const **); // { dg-message "candidate" } +template <typename T> void Foo (T const **); // { dg-message "note" } template <typename T> void Bar (T const * const *); void Foo (int); // { dg-message "note" } void Foo (float); // { dg-message "note" } candidate @@ -16,5 +16,6 @@ void Foo (float); // { dg-message "note" } candidate void baz (int **p1) { Foo (p1); // { dg-error "match" } no such function + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } Bar (p1); // OK } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C index dae13b67bd5..f3490762621 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C @@ -66,6 +66,7 @@ int main() { // no edge weighting, therefore type Empty: Graph<std::string, Empty> V(true); // { dg-error "no match" } no bool constructor + // { dg-message "candidate" "candidate note" { target *-*-* } 68 } // ReadGraph(V, "gra1.dat"); // display of vertices with successors diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C index bb8892c7f61..329393aeadf 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C @@ -1,11 +1,12 @@ // { dg-do assemble } template<bool B> -void f() // { dg-message "candidate" } +void f() // { dg-message "note" } { } int main() { f<bool>(); // { dg-error "" } .* + // { dg-message "candidate" "candidate note" { target *-*-* } 9 } } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C index 75341d4148a..67445308c1a 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C @@ -10,11 +10,13 @@ struct a { void bar( double ); void bar( float ); - void foo( void (a::*member)(float) ); // { dg-message "candidate" } + void foo( void (a::*member)(float) ); // { dg-message "void a::foo|no known conversion" } }; a::a() { foo( &junk ); // { dg-error "match" } junk is an unqualified-id. + // { dg-message "candidate" "candidate note" { target *-*-* } 18 } foo( &bar ); // { dg-error "match" } bar is an unqualified-id. + // { dg-message "candidate" "candidate note" { target *-*-* } 20 } } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C index 28953b05b4e..a78ea41085a 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb22.C @@ -11,12 +11,12 @@ public: operator int() const {return 2;} }; -bool operator==(const MyInt& a, const int& b) // { dg-message "note" } candidate +bool operator==(const MyInt& a, const int& b) // { dg-message "operator==" } candidate { return (int)a == b; } -bool operator==(const MyInt& a, const MyInt& b) // { dg-message "note" } candidate +bool operator==(const MyInt& a, const MyInt& b) // { dg-message "operator==" } candidate { return (int)a == (int)b; } @@ -24,5 +24,6 @@ bool operator==(const MyInt& a, const MyInt& b) // { dg-message "note" } candida bool f() { return 3 == MyInt(); // { dg-error "ambiguous" "err" } + // { dg-message "operator==" "match candidate text" { target *-*-* } 26 } // { dg-message "candidates" "note" { target *-*-* } 26 } } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C index 74051a148ad..1ada9123429 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb69.C @@ -6,12 +6,13 @@ int r = 0; struct foo { // { dg-message "note" } candidate - foo(int x) { r = 1; } // { dg-message "candidate" } + foo(int x) { r = 1; } // { dg-message "note" } }; struct bar : foo { typedef int an_int; bar() : bar::an_int(3) {} // { dg-error "match" "match" } not a base + // { dg-message "candidate" "candidate note" { target *-*-* } 14 } // { dg-message "expected" "exp" { target *-*-* } 14 } }; diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C index 5fb4861a3a4..c5620316e9c 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C @@ -5,7 +5,7 @@ template<class T, unsigned int Length> inline unsigned int - extent(T (&x)[Length]) // { dg-message "candidate" } + extent(T (&x)[Length]) // { dg-message "note" } { return Length; } @@ -15,4 +15,5 @@ void f() { extent(b); // { dg-error "" } no matching function + // { dg-message "candidate" "candidate note" { target *-*-* } 17 } } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46866.c b/gcc/testsuite/gcc.c-torture/compile/pr46866.c new file mode 100644 index 00000000000..4941148571f --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr46866.c @@ -0,0 +1,19 @@ +extern void *malloc(__SIZE_TYPE__); +typedef struct T T; +struct T { + void (*destroy)(void *); +}; +void destroy(union { void *this; } __attribute__((transparent_union))); +static const typeof(destroy) *_destroy = (const typeof(destroy)*)destroy; +void destroy(void *this); +static T *create_empty(void) +{ + T *this = malloc(sizeof(*this)); + *this = (typeof(*this)){ _destroy }; + return this; +} +void openssl_crl_load(void) +{ + T *this = create_empty(); + destroy(this); +} diff --git a/gcc/testsuite/gcc.dg/dfp/struct-union.c b/gcc/testsuite/gcc.dg/dfp/struct-union.c index 88589260c77..956fdcf2158 100644 --- a/gcc/testsuite/gcc.dg/dfp/struct-union.c +++ b/gcc/testsuite/gcc.dg/dfp/struct-union.c @@ -33,22 +33,22 @@ union u h (union u u) void f() { - cs.d32 = 1.23dd; /* { dg-error "assignment of read-only variable" } */ - cs.d64 = 1.23df; /* { dg-error "assignment of read-only variable" } */ + cs.d32 = 1.23dd; /* { dg-error "assignment of member 'd32' in read-only object" } */ + cs.d64 = 1.23df; /* { dg-error "assignment of member 'd64' in read-only object" } */ s.d64 = 1.23df; /* { dg-error "assignment of read-only member" } */ s.d32 = 1.23dd; u.d32 = 1.23dd; u.d64 = 1.23df; /* { dg-error "assignment of read-only member" } */ - u.cs.d32 = 1.23dd; /* { dg-error "assignment of read-only member" } */ - u.cs.d64 = 1.23df; /* { dg-error "assignment of read-only member" } */ + u.cs.d32 = 1.23dd; /* { dg-error "assignment of member 'd32' in read-only object" } */ + u.cs.d64 = 1.23df; /* { dg-error "assignment of member 'd64' in read-only object" } */ - cu.d32 = 1.23dd; /* { dg-error "assignment of read-only variable" } */ + cu.d32 = 1.23dd; /* { dg-error "assignment of member 'd32' in read-only object" } */ - cu.d64 = 1.23df; /* { dg-error "assignment of read-only variable" } */ - cu.cs.d32 = 1.23dd; /* { dg-error "assignment of read-only variable" } */ - cu.cs.d64 = 1.23df; /* { dg-error "assignment of read-only variable" } */ + cu.d64 = 1.23df; /* { dg-error "assignment of member 'd64' in read-only object" } */ + cu.cs.d32 = 1.23dd; /* { dg-error "assignment of member 'd32' in read-only object" } */ + cu.cs.d64 = 1.23df; /* { dg-error "assignment of member 'd64' in read-only object" } */ /* f().x is a valid postfix expression but is not an lvalue if function f() returning a structure or union. */ diff --git a/gcc/testsuite/gcc.dg/graphite/id-pr45230-1.c b/gcc/testsuite/gcc.dg/graphite/id-pr45230-1.c new file mode 100644 index 00000000000..ba14fe5572d --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/id-pr45230-1.c @@ -0,0 +1,140 @@ +/* Copyright (C) 2002 Free Software Foundation. + + Test strncmp with various combinations of pointer alignments and lengths to + make sure any optimizations in the library are correct. + + Written by Michael Meissner, March 9, 2002. */ + +#include <string.h> +#include <stddef.h> + +#ifndef MAX_OFFSET +#define MAX_OFFSET (sizeof (long long)) +#endif + +#ifndef MAX_TEST +#define MAX_TEST (8 * sizeof (long long)) +#endif + +#ifndef MAX_EXTRA +#define MAX_EXTRA (sizeof (long long)) +#endif + +#define MAX_LENGTH (MAX_OFFSET + MAX_TEST + MAX_EXTRA) + +static union { + unsigned char buf[MAX_LENGTH]; + long long align_int; + long double align_fp; +} u1, u2; + +void +test (const unsigned char *s1, const unsigned char *s2, size_t len, int expected) +{ + int value = strncmp ((char *) s1, (char *) s2, len); + + if (expected < 0 && value >= 0) + __builtin_abort (); + else if (expected == 0 && value != 0) + __builtin_abort (); + else if (expected > 0 && value <= 0) + __builtin_abort (); +} + +main () +{ + size_t off1, off2, len, i; + unsigned char *buf1, *buf2; + unsigned char *mod1, *mod2; + unsigned char *p1, *p2; + + for (off1 = 0; off1 < MAX_OFFSET; off1++) + for (off2 = 0; off2 < MAX_OFFSET; off2++) + for (len = 0; len < MAX_TEST; len++) + { + p1 = u1.buf; + for (i = 0; i < off1; i++) + *p1++ = '\0'; + + buf1 = p1; + for (i = 0; i < len; i++) + *p1++ = 'a'; + + mod1 = p1; + for (i = 0; i < MAX_EXTRA; i++) + *p1++ = 'x'; + + p2 = u2.buf; + for (i = 0; i < off2; i++) + *p2++ = '\0'; + + buf2 = p2; + for (i = 0; i < len; i++) + *p2++ = 'a'; + + mod2 = p2; + for (i = 0; i < MAX_EXTRA; i++) + *p2++ = 'x'; + + mod1[0] = '\0'; + mod2[0] = '\0'; + test (buf1, buf2, MAX_LENGTH, 0); + test (buf1, buf2, len, 0); + + mod1[0] = 'a'; + mod1[1] = '\0'; + mod2[0] = '\0'; + test (buf1, buf2, MAX_LENGTH, +1); + test (buf1, buf2, len, 0); + + mod1[0] = '\0'; + mod2[0] = 'a'; + mod2[1] = '\0'; + test (buf1, buf2, MAX_LENGTH, -1); + test (buf1, buf2, len, 0); + + mod1[0] = 'b'; + mod1[1] = '\0'; + mod2[0] = 'c'; + mod2[1] = '\0'; + test (buf1, buf2, MAX_LENGTH, -1); + test (buf1, buf2, len, 0); + + mod1[0] = 'c'; + mod1[1] = '\0'; + mod2[0] = 'b'; + mod2[1] = '\0'; + test (buf1, buf2, MAX_LENGTH, +1); + test (buf1, buf2, len, 0); + + mod1[0] = 'b'; + mod1[1] = '\0'; + mod2[0] = (unsigned char)'\251'; + mod2[1] = '\0'; + test (buf1, buf2, MAX_LENGTH, -1); + test (buf1, buf2, len, 0); + + mod1[0] = (unsigned char)'\251'; + mod1[1] = '\0'; + mod2[0] = 'b'; + mod2[1] = '\0'; + test (buf1, buf2, MAX_LENGTH, +1); + test (buf1, buf2, len, 0); + + mod1[0] = (unsigned char)'\251'; + mod1[1] = '\0'; + mod2[0] = (unsigned char)'\252'; + mod2[1] = '\0'; + test (buf1, buf2, MAX_LENGTH, -1); + test (buf1, buf2, len, 0); + + mod1[0] = (unsigned char)'\252'; + mod1[1] = '\0'; + mod2[0] = (unsigned char)'\251'; + mod2[1] = '\0'; + test (buf1, buf2, MAX_LENGTH, +1); + test (buf1, buf2, len, 0); + } + + __builtin_exit (0); +} diff --git a/gcc/testsuite/gcc.dg/graphite/id-pr45231.c b/gcc/testsuite/gcc.dg/graphite/id-pr45231.c new file mode 100644 index 00000000000..01e9a672e88 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/id-pr45231.c @@ -0,0 +1,37 @@ +void +f (n, ppt, xrot) +{ + int tileWidth; + int nlwSrc; + int srcx; + int v3, v4; + register unsigned long ca1, cx1, ca2, cx2; + unsigned long *pSrcLine; + register unsigned long *pDst; + register unsigned long *pSrc; + register unsigned long b, tmp; + unsigned long tileEndMask; + int v1, v2; + int tileEndPart; + int needFirst; + tileEndPart = 0; + v1 = tileEndPart << 5; + v2 = 32 - v1; + while (n--) + { + if ((srcx = (ppt - xrot) % tileWidth) < 0) + if (needFirst) + if (nlwSrc == 1) + { + tmp = b; + if (tileEndPart) + b = (*pSrc & tileEndMask) | (*pSrcLine >> v1); + } + if (tileEndPart) + b = (tmp << v1) | (b >> v2); + if (v4 != 32) + *pDst = (*pDst & ((tmp << v3) | (b >> v4) & ca1 ^ cx1) + ^ (((tmp << v3) | (b >> v4)) & ca2 ^ cx2)); + *pDst = *pDst & tmp; + } +} diff --git a/gcc/testsuite/gcc.dg/lvalue-2.c b/gcc/testsuite/gcc.dg/lvalue-2.c index a6f88096226..7f9372f30e2 100644 --- a/gcc/testsuite/gcc.dg/lvalue-2.c +++ b/gcc/testsuite/gcc.dg/lvalue-2.c @@ -26,23 +26,23 @@ void f1 (void) { c = 1; /* { dg-error "assignment of read-only variable 'c'" } */ - d.x = 1; /* { dg-error "assignment of read-only variable 'd'" } */ + d.x = 1; /* { dg-error "assignment of member 'x' in read-only object" } */ e.x = 1; /* { dg-error "assignment of read-only member 'x'" } */ *f = 1; /* { dg-error "assignment of read-only location" } */ c++; /* { dg-error "increment of read-only variable 'c'" } */ - d.x++; /* { dg-error "increment of read-only variable 'd'" } */ + d.x++; /* { dg-error "increment of member 'x' in read-only object" } */ e.x++; /* { dg-error "increment of read-only member 'x'" } */ (*f)++; /* { dg-error "increment of read-only location" } */ ++c; /* { dg-error "increment of read-only variable 'c'" } */ - ++d.x; /* { dg-error "increment of read-only variable 'd'" } */ + ++d.x; /* { dg-error "increment of member 'x' in read-only object" } */ ++e.x; /* { dg-error "increment of read-only member 'x'" } */ ++(*f); /* { dg-error "increment of read-only location" } */ c--; /* { dg-error "decrement of read-only variable 'c'" } */ - d.x--; /* { dg-error "decrement of read-only variable 'd'" } */ + d.x--; /* { dg-error "decrement of member 'x' in read-only object" } */ e.x--; /* { dg-error "decrement of read-only member 'x'" } */ (*f)--; /* { dg-error "decrement of read-only location" } */ --c; /* { dg-error "decrement of read-only variable 'c'" } */ - --d.x; /* { dg-error "decrement of read-only variable 'd'" } */ + --d.x; /* { dg-error "decrement of member 'x' in read-only object" } */ --e.x; /* { dg-error "decrement of read-only member 'x'" } */ --(*f); /* { dg-error "decrement of read-only location" } */ } diff --git a/gcc/testsuite/gcc.dg/pr21419.c b/gcc/testsuite/gcc.dg/pr21419.c index dc8f602e6b2..120ed7f1415 100644 --- a/gcc/testsuite/gcc.dg/pr21419.c +++ b/gcc/testsuite/gcc.dg/pr21419.c @@ -9,7 +9,7 @@ void f(void) void g(const int set) { - __asm__ __volatile__ ("" : "=r" (set)); /* { dg-error "read-only location" } */ + __asm__ __volatile__ ("" : "=r" (set)); /* { dg-error "read-only parameter" } */ } diff --git a/gcc/testsuite/gcc.dg/pr43157.c b/gcc/testsuite/gcc.dg/pr43157.c new file mode 100644 index 00000000000..aef357f69d7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr43157.c @@ -0,0 +1,19 @@ +/* { dg-do link } */ +/* { dg-require-effective-target lto } */ +/* { dg-options "-O1 -flto -fuse-linker-plugin" } */ + +#define LABEL3(pfx, x) # pfx x +#define LABEL2(pfx, x) LABEL3(pfx, x) +#define LABEL(x) LABEL2(__USER_LABEL_PREFIX__, x) + +unsigned int factorial_ (unsigned int) __asm__ (LABEL ("factorial")); + +unsigned int factorial (unsigned int i) +{ + return i > 1 ? i * factorial_ (i - 1) : 1; +} + +int main (void) +{ + return factorial (5); +} diff --git a/gcc/testsuite/gcc.dg/qual-component-1.c b/gcc/testsuite/gcc.dg/qual-component-1.c index dbf61158f6d..dedc63f39b2 100644 --- a/gcc/testsuite/gcc.dg/qual-component-1.c +++ b/gcc/testsuite/gcc.dg/qual-component-1.c @@ -62,39 +62,39 @@ f (void) *v2->f[0] = 0; /* { dg-error "assignment of read-only" } */ **v2->f = 0; /* { dg-error "assignment of read-only" } */ - v3->a = 0; /* { dg-error "assignment of read-only" } */ + v3->a = 0; /* { dg-error "assignment of member" } */ v3->b[0] = 0; /* { dg-error "assignment of read-only" } */ *v3->b = 0; /* { dg-error "assignment of read-only" } */ v3->c[0][0] = 0; /* { dg-error "assignment of read-only" } */ *v3->c[0] = 0; /* { dg-error "assignment of read-only" } */ **v3->c = 0; /* { dg-error "assignment of read-only" } */ - v3->d = 0; /* { dg-error "assignment of read-only" } */ + v3->d = 0; /* { dg-error "assignment of member" } */ v3->e[0] = 0; /* { dg-error "assignment of read-only" } */ *v3->e = 0; /* { dg-error "assignment of read-only" } */ v3->f[0][0] = 0; /* { dg-error "assignment of read-only" } */ *v3->f[0] = 0; /* { dg-error "assignment of read-only" } */ **v3->f = 0; /* { dg-error "assignment of read-only" } */ - v4.a = 0; /* { dg-error "assignment of read-only" } */ + v4.a = 0; /* { dg-error "assignment of member" } */ v4.b[0] = 0; /* { dg-error "assignment of read-only" } */ *v4.b = 0; /* { dg-error "assignment of read-only" } */ v4.c[0][0] = 0; /* { dg-error "assignment of read-only" } */ *v4.c[0] = 0; /* { dg-error "assignment of read-only" } */ **v4.c = 0; /* { dg-error "assignment of read-only" } */ - v4.d = 0; /* { dg-error "assignment of read-only" } */ + v4.d = 0; /* { dg-error "assignment of member" } */ v4.e[0] = 0; /* { dg-error "assignment of read-only" } */ *v4.e = 0; /* { dg-error "assignment of read-only" } */ v4.f[0][0] = 0; /* { dg-error "assignment of read-only" } */ *v4.f[0] = 0; /* { dg-error "assignment of read-only" } */ **v4.f = 0; /* { dg-error "assignment of read-only" } */ - v5.x.a = 0; /* { dg-error "assignment of read-only" } */ + v5.x.a = 0; /* { dg-error "assignment of member" } */ v5.x.b[0] = 0; /* { dg-error "assignment of read-only" } */ *v5.x.b = 0; /* { dg-error "assignment of read-only" } */ v5.x.c[0][0] = 0; /* { dg-error "assignment of read-only" } */ *v5.x.c[0] = 0; /* { dg-error "assignment of read-only" } */ **v5.x.c = 0; /* { dg-error "assignment of read-only" } */ - v5.x.d = 0; /* { dg-error "assignment of read-only" } */ + v5.x.d = 0; /* { dg-error "assignment of member" } */ v5.x.e[0] = 0; /* { dg-error "assignment of read-only" } */ *v5.x.e = 0; /* { dg-error "assignment of read-only" } */ v5.x.f[0][0] = 0; /* { dg-error "assignment of read-only" } */ diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c index 1370f63c292..e226e7f0371 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c index 284daad0eaf..332103a7633 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c index 11e71c60a4c..38127fd503a 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c index fd51b5f7110..85a2ee3f3cc 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c index 4e2c8729af0..8402f95f594 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c index d54e3b92c9f..dabc310d752 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c index 373299185a8..d35c9a7ce8a 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c index 60322fc62b6..05cb83301a3 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c index 1bff181c24b..b917e824b62 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c index 163e54c5908..b218a14edf6 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c @@ -1,4 +1,6 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ + #include "check.h" #ifndef ALIGNMENT diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c index 79e3733484b..86021329894 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c index 62b236522ec..5b36f2cd4cc 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include <stdarg.h> #include "check.h" diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c index 00b723b0dc4..6740e994e2f 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */ #include <stdarg.h> #include "check.h" diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c index f86b6debb60..1fc7e3ba2bb 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c @@ -33,5 +33,5 @@ void test55 (int x, int y) that the && should be emitted (based on BRANCH_COST). Fix this by teaching dom to look through && and register all components as true. */ -/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail { ! "powerpc*-*-* cris-*-* crisv32-*-* mmix-*-* mips*-*-* m68k*-*-* moxie-*-* sparc*-*-*" } } } } */ +/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail { ! "powerpc*-*-* cris-*-* crisv32-*-* hppa*-*-* mmix-*-* mips*-*-* m68k*-*-* moxie-*-* sparc*-*-*" } } } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/arm/pr46631.c b/gcc/testsuite/gcc.target/arm/pr46631.c new file mode 100644 index 00000000000..6f6dc4e85de --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr46631.c @@ -0,0 +1,16 @@ +/* { dg-options "-mthumb -Os" } */ +/* { dg-require-effective-target arm_thumb2_ok } */ +/* { dg-final { scan-assembler "ands" } } */ + +struct S { + int bi_buf; + int bi_valid; +}; + +int tz (struct S* p, int bits, int value) +{ + if (p == 0) return 1; + p->bi_valid = bits; + p->bi_buf = value & ((1 << bits) - 1); + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr46865-1.c b/gcc/testsuite/gcc.target/i386/pr46865-1.c new file mode 100644 index 00000000000..220a1c0778b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr46865-1.c @@ -0,0 +1,31 @@ +/* PR rtl-optimization/46865 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +extern unsigned long f; + +#define m1(f) \ + if (f & 1) \ + asm volatile ("nop /* asmnop */\n"); \ + else \ + asm volatile ("nop /* asmnop */\n"); + +#define m2(f) \ + if (f & 1) \ + asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx"); \ + else \ + asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx"); + +void +foo (void) +{ + m1 (f); +} + +void +bar (void) +{ + m2 (f); +} + +/* { dg-final { scan-assembler-times "asmnop" 2 } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr46865-2.c b/gcc/testsuite/gcc.target/i386/pr46865-2.c new file mode 100644 index 00000000000..4a91f7c962b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr46865-2.c @@ -0,0 +1,32 @@ +/* PR rtl-optimization/46865 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -save-temps" } */ + +extern unsigned long f; + +#define m1(f) \ + if (f & 1) \ + asm volatile ("nop /* asmnop */\n"); \ + else \ + asm volatile ("nop /* asmnop */\n"); + +#define m2(f) \ + if (f & 1) \ + asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx"); \ + else \ + asm volatile ("nop /* asmnop */\n" : : "i" (6) : "cx"); + +void +foo (void) +{ + m1 (f); +} + +void +bar (void) +{ + m2 (f); +} + +/* { dg-final { scan-assembler-times "asmnop" 2 } } */ +/* { dg-final { cleanup-saved-temps } } */ diff --git a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c index da36efa1d9d..db1fbd0a36c 100644 --- a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c +++ b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target lp64 } */ -/* { dg-options "-O2 -msse4 -march=core2" } */ +/* { dg-options "-O2 -msse4 -march=core2 -dp" } */ #include <emmintrin.h> @@ -10,4 +10,4 @@ test (long long b) return _mm_cvtsi64_si128 (b); } -/* { dg-final { scan-assembler "movq" } } */ +/* { dg-final { scan-assembler-times "\\*vec_concatv2di_rex64_sse4_1/3" 1 } } */ diff --git a/gcc/testsuite/gcc.target/ia64/pr43603.c b/gcc/testsuite/gcc.target/ia64/pr43603.c new file mode 100644 index 00000000000..ad3a5b114bc --- /dev/null +++ b/gcc/testsuite/gcc.target/ia64/pr43603.c @@ -0,0 +1,39 @@ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ + +int +foo( long * np, int * dp, int qn) +{ + int i; + int n0; + int d0; + int a; + int b; + int c; + int d; + + a = 1; + b = 0; + c = 1; + d = 1; + + d0 = dp[0]; + + for (i = qn; i >= 0; i--) { + if (bar((c == 0)) && (np[1] == d0)) { + car(np - 3, dp, 3); + } else { + __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0" : "=&f" ((a)), +"=f" (b) : "f" ((c)), "f" ((d))); + n0 = np[0]; + if (n0 < d0) + c = 1; + else + c = 0; + + } + *--np = a; + } + + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-pow.c b/gcc/testsuite/gcc.target/powerpc/ppc-pow.c new file mode 100644 index 00000000000..1255d5c5966 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/ppc-pow.c @@ -0,0 +1,34 @@ +/* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */ +/* { dg-options "-O2 -ffast-math -mcpu=power6" } */ +/* { dg-final { scan-assembler-times "fsqrt" 3 } } */ +/* { dg-final { scan-assembler-times "fmul" 1 } } */ +/* { dg-final { scan-assembler-times "bl pow" 1 } } */ +/* { dg-final { scan-assembler-times "bl sqrt" 1 } } */ + +double +do_pow_0_75_default (double a) +{ + return __builtin_pow (a, 0.75); /* should generate 2 fsqrts */ +} + +double +do_pow_0_5_default (double a) +{ + return __builtin_pow (a, 0.5); /* should generate fsqrt */ +} + +#pragma GCC target "no-powerpc-gpopt,no-powerpc-gfxopt" + +double +do_pow_0_75_nosqrt (double a) +{ + return __builtin_pow (a, 0.75); /* should call pow */ +} + +double +do_pow_0_5_nosqrt (double a) +{ + return __builtin_pow (a, 0.5); /* should call sqrt */ +} + +#pragma GCC reset_options diff --git a/gcc/testsuite/gfortran.dg/graphite/id-pr45370.f90 b/gcc/testsuite/gfortran.dg/graphite/id-pr45370.f90 new file mode 100644 index 00000000000..94eebd1f8a5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/graphite/id-pr45370.f90 @@ -0,0 +1,100 @@ +! + type :: t + real :: r + integer :: i + character(3) :: chr + end type t + + type :: t2 + real :: r(2, 2) + integer :: i + character(3) :: chr + end type t2 + + type :: s + type(t), pointer :: t(:) + end type s + + integer, parameter :: sh(2) = (/2,2/) + real, parameter :: a1(2,2) = reshape ((/1.0,2.0,3.0,4.0/),sh) + real, parameter :: a2(2,2) = reshape ((/5.0,6.0,7.0,8.0/),sh) + + type(t), target :: tar1(2) = (/t(1.0, 2, "abc"), t(3.0, 4, "efg")/) + character(4), target :: tar2(2) = (/"abcd","efgh"/) + type(s), target :: tar3 + character(2), target :: tar4(2) = (/"ab","cd"/) + type(t2), target :: tar5(2) = (/t2(a1, 2, "abc"), t2(a2, 4, "efg")/) + + integer, pointer :: ptr(:) + character(2), pointer :: ptr2(:) + real, pointer :: ptr3(:) + +!_______________component subreference___________ + ptr => tar1%i + ptr = ptr + 1 ! check the scalarizer is OK + + if (any (ptr .ne. (/3, 5/))) call abort () + if (any ((/ptr(1), ptr(2)/) .ne. (/3, 5/))) call abort () + if (any (tar1%i .ne. (/3, 5/))) call abort () + +! Make sure that the other components are not touched. + if (any (tar1%r .ne. (/1.0, 3.0/))) call abort () + if (any (tar1%chr .ne. (/"abc", "efg"/))) call abort () + +! Check that the pointer is passed correctly as an actual argument. + call foo (ptr) + if (any (tar1%i .ne. (/2, 4/))) call abort () + +! And that dummy pointers are OK too. + call bar (ptr) + if (any (tar1%i .ne. (/101, 103/))) call abort () + +!_______________substring subreference___________ + ptr2 => tar2(:)(2:3) + ptr2 = ptr2(:)(2:2)//"z" ! again, check the scalarizer + + if (any (ptr2 .ne. (/"cz", "gz"/))) call abort () + if (any ((/ptr2(1), ptr2(2)/) .ne. (/"cz", "gz"/))) call abort () + if (any (tar2 .ne. (/"aczd", "egzh"/))) call abort () + +!_______________substring component subreference___________ + ptr2 => tar1(:)%chr(1:2) + ptr2 = ptr2(:)(2:2)//"q" ! yet again, check the scalarizer + if (any (ptr2 .ne. (/"bq","fq"/))) call abort () + if (any (tar1%chr .ne. (/"bqc","fqg"/))) call abort () + +!_______________trailing array element subreference___________ + ptr3 => tar5%r(1,2) + ptr3 = (/99.0, 999.0/) + if (any (tar5(1)%r .ne. reshape ((/1.0,2.0,99.0,4.0/), sh))) call abort () + if (any (tar5(2)%r .ne. reshape ((/5.0,6.0,999.0,8.0/), sh))) call abort () + +!_______________forall assignment___________ + ptr2 => tar2(:)(1:2) + forall (i = 1:2) ptr2(i)(1:1) = "z" + if (any (tar2 .ne. (/"zczd", "zgzh"/))) call abort () + +!_______________something more complicated___________ + tar3%t => tar1 + ptr3 => tar3%t%r + ptr3 = cos (ptr3) + if (any (abs(ptr3 - (/cos(1.0_4), cos(3.0_4)/)) >= epsilon(1.0_4))) call abort () + + ptr2 => tar3%t(:)%chr(2:3) + ptr2 = " x" + if (any (tar1%chr .ne. (/"b x", "f x"/))) call abort () + +!_______________check non-subref works still___________ + ptr2 => tar4 + if (any (ptr2 .ne. (/"ab","cd"/))) call abort () + +contains + subroutine foo (arg) + integer :: arg(:) + arg = arg - 1 + end subroutine + subroutine bar (arg) + integer, pointer :: arg(:) + arg = arg + 99 + end subroutine +end diff --git a/gcc/testsuite/gfortran.dg/ldist-1.f90 b/gcc/testsuite/gfortran.dg/ldist-1.f90 index dd1f02a176b..bbce2f355e1 100644 --- a/gcc/testsuite/gfortran.dg/ldist-1.f90 +++ b/gcc/testsuite/gfortran.dg/ldist-1.f90 @@ -29,5 +29,8 @@ Subroutine PADEC(DKS,DKDS,HVAR,WM,WG,FN,NS,AN,BN,CN,IT) return end Subroutine PADEC -! { dg-final { scan-tree-dump-times "distributed: split to 4 loops" 1 "ldist" } } +! There are 5 legal partitions in this code. Based on the data +! locality heuristic, this loop should not be split. + +! { dg-final { scan-tree-dump-not "distributed: split to" "ldist" } } ! { dg-final { cleanup-tree-dump "ldist" } } diff --git a/gcc/testsuite/gfortran.dg/ldist-pr43023.f90 b/gcc/testsuite/gfortran.dg/ldist-pr43023.f90 new file mode 100644 index 00000000000..3e2d04c9490 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/ldist-pr43023.f90 @@ -0,0 +1,31 @@ +! { dg-do compile } +! { dg-options "-O2 -ftree-loop-distribution" } + +MODULE NFT_mod + +implicit none +integer :: Nangle +real:: Z0 +real, dimension(:,:), allocatable :: Angle +real, dimension(:), allocatable :: exth, ezth, hxth, hyth, hyphi + +CONTAINS + +SUBROUTINE NFT_Init() + +real :: th, fi +integer :: n + +do n = 1,Nangle + th = Angle(n,1) + fi = Angle(n,2) + + exth(n) = cos(fi)*cos(th) + ezth(n) = -sin(th) + hxth(n) = -sin(fi) + hyth(n) = cos(fi) + hyphi(n) = -sin(fi) +end do +END SUBROUTINE NFT_Init + +END MODULE NFT_mod diff --git a/gcc/testsuite/gfortran.dg/pr46804.f90 b/gcc/testsuite/gfortran.dg/pr46804.f90 new file mode 100644 index 00000000000..ee44a56c897 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr46804.f90 @@ -0,0 +1,36 @@ +! PR rtl-optimization/46804 +! { dg-do run } +! { dg-options "-O -fPIC -fexpensive-optimizations -fgcse -foptimize-register-move -fpeel-loops -fno-tree-loop-optimize" } + +program main + integer, parameter :: n1 = 2, n2 = 3, n3 = 4, slen = 3 + character (len = slen), dimension (n1, n2, n3) :: a + integer (kind = 1), dimension (2, 4) :: shift1 + integer (kind = 2), dimension (2, 4) :: shift2 + integer (kind = 4), dimension (2, 4) :: shift3 + do i3 = 1, n3 + do i2 = 1, n2 + do i1 = 1, n1 + a (i1, i2, i3) = 'ab'(i1:i1) // 'cde'(i2:i2) // 'fghi'(i3:i3) + end do + end do + end do + shift1 (1, :) = (/ 4, 11, 19, 20 /) + shift1 (2, :) = (/ 55, 5, 1, 2 /) + shift2 = shift1 + shift3 = shift1 + call test (cshift (a, shift2, 2)) + call test (cshift (a, shift3, 2)) +contains + subroutine test (b) + character (len = slen), dimension (n1, n2, n3) :: b + do i3 = 1, n3 + do i2 = 1, n2 + do i1 = 1, n1 + i2p = mod (shift1 (i1, i3) + i2 - 1, n2) + 1 + if (b (i1, i2, i3) .ne. a (i1, i2p, i3)) call abort + end do + end do + end do + end subroutine test +end program main diff --git a/gcc/testsuite/gfortran.dg/string_4.f90 b/gcc/testsuite/gfortran.dg/string_4.f90 new file mode 100644 index 00000000000..12f501bb9ab --- /dev/null +++ b/gcc/testsuite/gfortran.dg/string_4.f90 @@ -0,0 +1,51 @@ +! { dg-do compile } +! { dg-options "" } +! (options to disable warnings about statement functions etc.) +! +! PR fortran/44352 +! +! Contributed by Vittorio Zecca +! + + SUBROUTINE TEST1() + implicit real*8 (a-h,o-z) + character*32 ddname,stmtfnt1 + stmtfnt1(x)= 'h810 e=0.01 ' + ddname=stmtfnt1(0.d0) + if (ddname /= "h810 e=0.01") call abort() + END + + SUBROUTINE TEST2() + implicit none + character(2) :: ddname,stmtfnt2 + real :: x + stmtfnt2(x)= 'x' + ddname=stmtfnt2(0.0) + if(ddname /= 'x') call abort() + END + + SUBROUTINE TEST3() + implicit real*8 (a-h,o-z) + character*32 ddname,dname + character*2 :: c + dname(c) = 'h810 e=0.01 ' + ddname=dname("w ") + if (ddname /= "h810 e=0.01") call abort() + END + + SUBROUTINE TEST4() + implicit real*8 (a-h,o-z) + character*32 ddname,dname + character*2 :: c + dname(c) = 'h810 e=0.01 ' + c = 'aa' + ddname=dname("w ") + if (ddname /= "h810 e=0.01") call abort() + if (c /= "aa") call abort() + END + + call test1() + call test2() + call test3() + call test4() + end diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp index 0ec277bd78a..4e08bf3d1cc 100644 --- a/gcc/testsuite/lib/prune.exp +++ b/gcc/testsuite/lib/prune.exp @@ -54,7 +54,9 @@ proc prune_gcc_output { text } { # Ignore harmless warnings from Xcode 3.2.x. regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text - + regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text + regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text + #send_user "After:$text\n" return $text diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index 71ea4154385..66c522343f5 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -339,8 +339,13 @@ proc dg-function-on-line { args } { } } - set pattern [format {%s:[^\t]*(\t.(fnstart|frame|mask|file)[^\t]*)*\t[^:]+:%d\n} \ - $symbol $line] + if { [istarget "hppa*-*-*"] } { + set pattern [format {\t;[^:]+:%d\n(\t[^\t]+\n)+%s:\n\t.PROC} \ + $line $symbol] + } else { + set pattern [format {%s:[^\t]*(\t.(fnstart|frame|mask|file)[^\t]*)*\t[^:]+:%d\n} \ + $symbol $line] + } # The lack of spaces around $pattern is important, since they'd # become part of the regex scan-assembler tries to match. diff --git a/gcc/testsuite/obj-c++.dg/class-extension-1.mm b/gcc/testsuite/obj-c++.dg/class-extension-1.mm new file mode 100644 index 00000000000..eab59c4137c --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/class-extension-1.mm @@ -0,0 +1,30 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do compile } */ + +/* This test tests the basic of class extensions. */ + +#include <objc/objc.h> + +@interface MyObject +{ + Class isa; +} +- (int) test; +@end + +@interface MyObject () +- (int) test2; +- (int) test3; +@end + +@implementation MyObject +- (int) test +{ + return 20; +} +- (int) test2 +{ + return 20; +} +@end /* { dg-warning "incomplete implementation of class .MyObject." } */ + /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } 29 } */ diff --git a/gcc/testsuite/obj-c++.dg/class-extension-2.mm b/gcc/testsuite/obj-c++.dg/class-extension-2.mm new file mode 100644 index 00000000000..79b126f529a --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/class-extension-2.mm @@ -0,0 +1,56 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do compile } */ + +/* This test tests class extensions and protocols. */ + +#include <objc/objc.h> + +/* First, a simple test where a plain class has a protocol attached to + it in a class extension. */ +@interface MyObject +{ + Class isa; +} +@end + +@protocol MyProtocol +- (void) test; +@end + +@interface MyObject () <MyProtocol> +@end + +@implementation MyObject +@end /* { dg-warning "incomplete implementation of class .MyObject." } */ + /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } 24 } */ + /* { dg-warning "class .MyObject. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 24 } */ + + + +/* Second, a more interesting test where protocols are added from the + main class and from two different class extensions. */ +@interface MyObject2 : MyObject <MyProtocol> +@end + +@protocol MyProtocol2 +- (void) test2; +@end + +@protocol MyProtocol3 +- (void) test3; +@end + +@interface MyObject2 () <MyProtocol2> +@end + +@interface MyObject2 () <MyProtocol3> +@end + +@implementation MyObject2 +@end /* { dg-warning "incomplete implementation of class .MyObject2." } */ + /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } 50 } */ + /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 50 } */ + /* { dg-warning "method definition for .-test2. not found" "" { target *-*-* } 50 } */ + /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } 50 } */ + /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } 50 } */ + /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol3. protocol" "" { target *-*-* } 50 } */ diff --git a/gcc/testsuite/obj-c++.dg/class-extension-3.mm b/gcc/testsuite/obj-c++.dg/class-extension-3.mm new file mode 100644 index 00000000000..8feb5c9b6f2 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/class-extension-3.mm @@ -0,0 +1,26 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do compile } */ + +/* This test tests warnings on class extensions. */ + +#include <objc/objc.h> + +@interface MyObject +{ + Class isa; + int count; +} +- (int) test; +@property int count; /* { dg-warning "originally specified here" } */ +@end + +@interface MyObject () +- (void) test; /* { dg-error "duplicate declaration of method .-test." } */ +@end + +@interface MyObject () +@end + +@interface MyObject () +@property int count; /* { dg-error "redeclaration of property .count." } */ +@end diff --git a/gcc/testsuite/obj-c++.dg/exceptions-3.mm b/gcc/testsuite/obj-c++.dg/exceptions-3.mm index b1ba1852725..adae263790f 100644 --- a/gcc/testsuite/obj-c++.dg/exceptions-3.mm +++ b/gcc/testsuite/obj-c++.dg/exceptions-3.mm @@ -72,8 +72,8 @@ int test (id object) @catch (MyObject x) /* { dg-error "@catch parameter is not a known Objective-C class type" } */ { /* { dg-error "no matching function" "" { target *-*-* } 72 } */ dummy++; /* { dg-warning "MyObject" "" { target *-*-* } 13 } */ - } - + } /* { dg-warning "candidate" "" { target *-*-* } 13 } */ + /* { dg-warning "candidate" "" { target *-*-* } 72 } */ @try { @throw object; } @catch (static MyObject *x) /* { dg-error "storage class" } */ { diff --git a/gcc/testsuite/obj-c++.dg/exceptions-5.mm b/gcc/testsuite/obj-c++.dg/exceptions-5.mm index f7404968844..ba0e543e98a 100644 --- a/gcc/testsuite/obj-c++.dg/exceptions-5.mm +++ b/gcc/testsuite/obj-c++.dg/exceptions-5.mm @@ -72,7 +72,8 @@ int test (id object) @catch (MyObject) /* { dg-error "@catch parameter is not a known Objective-C class type" } */ { /* { dg-error "no matching function" "" { target *-*-* } 72 } */ dummy++; /* { dg-warning "MyObject" "" { target *-*-* } 13 } */ - } + } /* { dg-warning "candidate" "" { target *-*-* } 13 } */ + /* { dg-warning "candidate" "" { target *-*-* } 72 } */ @try { @throw object; } @catch (static MyObject *) /* { dg-error "storage class" } */ diff --git a/gcc/testsuite/obj-c++.dg/exceptions-7.mm b/gcc/testsuite/obj-c++.dg/exceptions-7.mm new file mode 100644 index 00000000000..1f5adfc8906 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/exceptions-7.mm @@ -0,0 +1,18 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-options "-fobjc-exceptions" } */ +/* { dg-do compile } */ + +/* Test warnings when the argument of @throw is invalid. */ + +#include <objc/objc.h> + +void test (id object) +{ + struct x { int i; } invalid_1, *invalid_2; + + @throw object; /* Ok */ + @throw 1; /* { dg-error ".@throw. argument is not an object" } */ + @throw "string"; /* { dg-error ".@throw. argument is not an object" } */ + @throw invalid_1; /* { dg-error ".@throw. argument is not an object" } */ + @throw invalid_2; /* { dg-error ".@throw. argument is not an object" } */ +} diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-26.mm b/gcc/testsuite/obj-c++.dg/property/at-property-26.mm new file mode 100644 index 00000000000..c45757e239a --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/property/at-property-26.mm @@ -0,0 +1,85 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ + +/* Test @properties in class extensions. */ + +#include <stdlib.h> +#include <objc/objc.h> +#include <objc/runtime.h> + +@interface MyRootClass +{ + Class isa; +} ++ (id) initialize; ++ (id) alloc; +- (id) init; +@end + +@implementation MyRootClass ++ (id) initialize { return self; } ++ (id) alloc { return class_createInstance (self, 0); } +- (id) init { return self; } +@end + +@protocol count4 +/* Use a different getters/setters, so that the only way to compile + object.countX is to find the actual @property. */ +@property (getter=number4, setter=setNumber4:) int count4; +@end + +@interface MySubClass : MyRootClass +{ + int count1; + int count2; + int count3; + int count4; +} +@property (getter=number1, setter=setNumber1:) int count1; +@end + +@interface MySubClass () +@property (getter=number2, setter=setNumber2:) int count2; +@end + +@interface MySubClass () <count4> +@property (getter=number3, setter=setNumber3:) int count3; +@end + +@implementation MySubClass +@synthesize count1; +@synthesize count2; +- (int) number3 +{ + return count3; +} +- (void) setNumber3: (int)value +{ + count3 = value; +} +@synthesize count4; +@end + +int main (void) +{ + MySubClass *object = [[MySubClass alloc] init]; + + object.count1 = 20; + if (object.count1 != 20) + abort (); + + object.count2 = 11; + if (object.count2 != 11) + abort (); + + object.count3 = 19; + if (object.count3 != 19) + abort (); + + object.count4 = 74; + if (object.count4 != 74) + abort (); + + return 0; +} diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-27.mm b/gcc/testsuite/obj-c++.dg/property/at-property-27.mm new file mode 100644 index 00000000000..727834684fe --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/property/at-property-27.mm @@ -0,0 +1,66 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ + +/* Test overriding a readonly @property with a readwrite one in a class extension. */ + +#include <stdlib.h> +#include <objc/objc.h> +#include <objc/runtime.h> + +@interface MyRootClass +{ + Class isa; +} ++ (id) initialize; ++ (id) alloc; +- (id) init; +@end + +@implementation MyRootClass ++ (id) initialize { return self; } ++ (id) alloc { return class_createInstance (self, 0); } +- (id) init { return self; } +@end + +@protocol count2 +/* Use a different getters/setters, so that the only way to compile + object.countX is to find the actual @property. */ +@property (readonly, getter=number2) int count2; +@end + +@interface MySubClass : MyRootClass +{ + int count1; + int count2; +} +@property (readonly, getter=number1) int count1; +@end + +@interface MySubClass () +@property (readwrite, getter=number1, setter=setNumber1:) int count1; +@end + +@interface MySubClass () <count2> +@property (readwrite, getter=number2, setter=setNumber2:) int count2; +@end + +@implementation MySubClass +@synthesize count1; +@synthesize count2; +@end + +int main (void) +{ + MySubClass *object = [[MySubClass alloc] init]; + + object.count1 = 20; + if (object.count1 != 20) + abort (); + + object.count2 = 11; + if (object.count2 != 11) + abort (); + + return 0; +} diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-28.mm b/gcc/testsuite/obj-c++.dg/property/at-property-28.mm new file mode 100644 index 00000000000..23b357c8505 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/property/at-property-28.mm @@ -0,0 +1,29 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do compile } */ + +/* Test errors when extending a property in a class extension. */ + +#include <objc/objc.h> +#include <objc/runtime.h> + +@interface MyRootClass +{ + Class isa; +} +@property (readonly, retain) id property1; /* { dg-warning "originally specified here" } */ +@property (readonly) int property2; /* { dg-warning "originally specified here" } */ +@property (readonly, getter=y) int property3; /* { dg-warning "originally specified here" } */ +@property (readonly) int property4; /* Ok */ +@property (readonly) int property5; /* { dg-warning "originally specified here" } */ +@end + +@interface MyRootClass () +@property (readwrite, copy) id property1; /* { dg-warning "assign semantics attributes of property .property1. conflict with previous declaration" } */ +@property (readwrite, nonatomic) int property2; /* { dg-warning ".nonatomic. attribute of property .property2. conflicts with previous declaration" } */ +@property (readwrite, getter=x) int property3; /* { dg-warning ".getter. attribute of property .property3. conflicts with previous declaration" } */ +@property (readwrite) int property4; /* Ok */ +@property (readwrite) float property5; /* { dg-warning "type of property .property5. conflicts with previous declaration" } */ +@end + + + diff --git a/gcc/testsuite/objc.dg/class-extension-1.m b/gcc/testsuite/objc.dg/class-extension-1.m new file mode 100644 index 00000000000..eab59c4137c --- /dev/null +++ b/gcc/testsuite/objc.dg/class-extension-1.m @@ -0,0 +1,30 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do compile } */ + +/* This test tests the basic of class extensions. */ + +#include <objc/objc.h> + +@interface MyObject +{ + Class isa; +} +- (int) test; +@end + +@interface MyObject () +- (int) test2; +- (int) test3; +@end + +@implementation MyObject +- (int) test +{ + return 20; +} +- (int) test2 +{ + return 20; +} +@end /* { dg-warning "incomplete implementation of class .MyObject." } */ + /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } 29 } */ diff --git a/gcc/testsuite/objc.dg/class-extension-2.m b/gcc/testsuite/objc.dg/class-extension-2.m new file mode 100644 index 00000000000..79b126f529a --- /dev/null +++ b/gcc/testsuite/objc.dg/class-extension-2.m @@ -0,0 +1,56 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do compile } */ + +/* This test tests class extensions and protocols. */ + +#include <objc/objc.h> + +/* First, a simple test where a plain class has a protocol attached to + it in a class extension. */ +@interface MyObject +{ + Class isa; +} +@end + +@protocol MyProtocol +- (void) test; +@end + +@interface MyObject () <MyProtocol> +@end + +@implementation MyObject +@end /* { dg-warning "incomplete implementation of class .MyObject." } */ + /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } 24 } */ + /* { dg-warning "class .MyObject. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 24 } */ + + + +/* Second, a more interesting test where protocols are added from the + main class and from two different class extensions. */ +@interface MyObject2 : MyObject <MyProtocol> +@end + +@protocol MyProtocol2 +- (void) test2; +@end + +@protocol MyProtocol3 +- (void) test3; +@end + +@interface MyObject2 () <MyProtocol2> +@end + +@interface MyObject2 () <MyProtocol3> +@end + +@implementation MyObject2 +@end /* { dg-warning "incomplete implementation of class .MyObject2." } */ + /* { dg-warning "method definition for .-test. not found" "" { target *-*-* } 50 } */ + /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol. protocol" "" { target *-*-* } 50 } */ + /* { dg-warning "method definition for .-test2. not found" "" { target *-*-* } 50 } */ + /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol2. protocol" "" { target *-*-* } 50 } */ + /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } 50 } */ + /* { dg-warning "class .MyObject2. does not fully implement the .MyProtocol3. protocol" "" { target *-*-* } 50 } */ diff --git a/gcc/testsuite/objc.dg/class-extension-3.m b/gcc/testsuite/objc.dg/class-extension-3.m new file mode 100644 index 00000000000..9564bf022cb --- /dev/null +++ b/gcc/testsuite/objc.dg/class-extension-3.m @@ -0,0 +1,26 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do compile } */ + +/* This test tests warnings on class extensions. */ + +#include <objc/objc.h> + +@interface MyObject +{ + Class isa; + int count; +} +- (int) test; +@property int count; /* { dg-message "originally specified here" } */ +@end + +@interface MyObject () +- (void) test; /* { dg-error "duplicate declaration of method .-test." } */ +@end + +@interface MyObject () +@end + +@interface MyObject () +@property int count; /* { dg-error "redeclaration of property .count." } */ +@end diff --git a/gcc/testsuite/objc.dg/exceptions-7.m b/gcc/testsuite/objc.dg/exceptions-7.m new file mode 100644 index 00000000000..1f5adfc8906 --- /dev/null +++ b/gcc/testsuite/objc.dg/exceptions-7.m @@ -0,0 +1,18 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-options "-fobjc-exceptions" } */ +/* { dg-do compile } */ + +/* Test warnings when the argument of @throw is invalid. */ + +#include <objc/objc.h> + +void test (id object) +{ + struct x { int i; } invalid_1, *invalid_2; + + @throw object; /* Ok */ + @throw 1; /* { dg-error ".@throw. argument is not an object" } */ + @throw "string"; /* { dg-error ".@throw. argument is not an object" } */ + @throw invalid_1; /* { dg-error ".@throw. argument is not an object" } */ + @throw invalid_2; /* { dg-error ".@throw. argument is not an object" } */ +} diff --git a/gcc/testsuite/objc.dg/foreach-6.m b/gcc/testsuite/objc.dg/foreach-6.m index 3578b77aa62..96b145365c1 100644 --- a/gcc/testsuite/objc.dg/foreach-6.m +++ b/gcc/testsuite/objc.dg/foreach-6.m @@ -46,16 +46,16 @@ int main (void) ; for (12 in array) /* { dg-error "invalid iterating variable in fast enumeration" } */ - ; /* { dg-error "iterating variable in fast enumeration is not an object" } */ + ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 48 } */ - for (object in 12) - ; /* { dg-error "collection in fast enumeration is not an object" } */ + for (object in 12) /* { dg-error "collection in fast enumeration is not an object" } */ + ; - for (object in invalid) - ; /* { dg-error "collection in fast enumeration is not an object" } */ + for (object in invalid) /* { dg-error "collection in fast enumeration is not an object" } */ + ; - for (invalid in [object enumerator]) - ; /* { dg-error "iterating variable in fast enumeration is not an object" } */ + for (invalid in [object enumerator]) /* { dg-error "iterating variable in fast enumeration is not an object" } */ + ; return 0; } diff --git a/gcc/testsuite/objc.dg/foreach-7.m b/gcc/testsuite/objc.dg/foreach-7.m index 5da940f620e..4629d61e1c1 100644 --- a/gcc/testsuite/objc.dg/foreach-7.m +++ b/gcc/testsuite/objc.dg/foreach-7.m @@ -36,10 +36,10 @@ int main (void) id object = nil; for (typedef int my_typedef in array) /* { dg-error "declaration of non-variable" } */ - ; /* { dg-error "iterating variable in fast enumeration is not an object" } */ + ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 38 } */ for (function () in nil) /* { dg-error "invalid iterating variable in fast enumeration" } */ - ; /* { dg-error "iterating variable in fast enumeration is not an object" } */ + ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 41 } */ for (object_function () in nil) /* { dg-error "invalid iterating variable in fast enumeration" } */ ; diff --git a/gcc/testsuite/objc.dg/property/at-property-26.m b/gcc/testsuite/objc.dg/property/at-property-26.m new file mode 100644 index 00000000000..c45757e239a --- /dev/null +++ b/gcc/testsuite/objc.dg/property/at-property-26.m @@ -0,0 +1,85 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ + +/* Test @properties in class extensions. */ + +#include <stdlib.h> +#include <objc/objc.h> +#include <objc/runtime.h> + +@interface MyRootClass +{ + Class isa; +} ++ (id) initialize; ++ (id) alloc; +- (id) init; +@end + +@implementation MyRootClass ++ (id) initialize { return self; } ++ (id) alloc { return class_createInstance (self, 0); } +- (id) init { return self; } +@end + +@protocol count4 +/* Use a different getters/setters, so that the only way to compile + object.countX is to find the actual @property. */ +@property (getter=number4, setter=setNumber4:) int count4; +@end + +@interface MySubClass : MyRootClass +{ + int count1; + int count2; + int count3; + int count4; +} +@property (getter=number1, setter=setNumber1:) int count1; +@end + +@interface MySubClass () +@property (getter=number2, setter=setNumber2:) int count2; +@end + +@interface MySubClass () <count4> +@property (getter=number3, setter=setNumber3:) int count3; +@end + +@implementation MySubClass +@synthesize count1; +@synthesize count2; +- (int) number3 +{ + return count3; +} +- (void) setNumber3: (int)value +{ + count3 = value; +} +@synthesize count4; +@end + +int main (void) +{ + MySubClass *object = [[MySubClass alloc] init]; + + object.count1 = 20; + if (object.count1 != 20) + abort (); + + object.count2 = 11; + if (object.count2 != 11) + abort (); + + object.count3 = 19; + if (object.count3 != 19) + abort (); + + object.count4 = 74; + if (object.count4 != 74) + abort (); + + return 0; +} diff --git a/gcc/testsuite/objc.dg/property/at-property-27.m b/gcc/testsuite/objc.dg/property/at-property-27.m new file mode 100644 index 00000000000..727834684fe --- /dev/null +++ b/gcc/testsuite/objc.dg/property/at-property-27.m @@ -0,0 +1,66 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do run } */ +/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ + +/* Test overriding a readonly @property with a readwrite one in a class extension. */ + +#include <stdlib.h> +#include <objc/objc.h> +#include <objc/runtime.h> + +@interface MyRootClass +{ + Class isa; +} ++ (id) initialize; ++ (id) alloc; +- (id) init; +@end + +@implementation MyRootClass ++ (id) initialize { return self; } ++ (id) alloc { return class_createInstance (self, 0); } +- (id) init { return self; } +@end + +@protocol count2 +/* Use a different getters/setters, so that the only way to compile + object.countX is to find the actual @property. */ +@property (readonly, getter=number2) int count2; +@end + +@interface MySubClass : MyRootClass +{ + int count1; + int count2; +} +@property (readonly, getter=number1) int count1; +@end + +@interface MySubClass () +@property (readwrite, getter=number1, setter=setNumber1:) int count1; +@end + +@interface MySubClass () <count2> +@property (readwrite, getter=number2, setter=setNumber2:) int count2; +@end + +@implementation MySubClass +@synthesize count1; +@synthesize count2; +@end + +int main (void) +{ + MySubClass *object = [[MySubClass alloc] init]; + + object.count1 = 20; + if (object.count1 != 20) + abort (); + + object.count2 = 11; + if (object.count2 != 11) + abort (); + + return 0; +} diff --git a/gcc/testsuite/objc.dg/property/at-property-28.m b/gcc/testsuite/objc.dg/property/at-property-28.m new file mode 100644 index 00000000000..de5122443c6 --- /dev/null +++ b/gcc/testsuite/objc.dg/property/at-property-28.m @@ -0,0 +1,29 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */ +/* { dg-do compile } */ + +/* Test errors when extending a property in a class extension. */ + +#include <objc/objc.h> +#include <objc/runtime.h> + +@interface MyRootClass +{ + Class isa; +} +@property (readonly, retain) id property1; /* { dg-message "originally specified here" } */ +@property (readonly) int property2; /* { dg-message "originally specified here" } */ +@property (readonly, getter=y) int property3; /* { dg-message "originally specified here" } */ +@property (readonly) int property4; /* Ok */ +@property (readonly) int property5; /* { dg-message "originally specified here" } */ +@end + +@interface MyRootClass () +@property (readwrite, copy) id property1; /* { dg-warning "assign semantics attributes of property .property1. conflict with previous declaration" } */ +@property (readwrite, nonatomic) int property2; /* { dg-warning ".nonatomic. attribute of property .property2. conflicts with previous declaration" } */ +@property (readwrite, getter=x) int property3; /* { dg-warning ".getter. attribute of property .property3. conflicts with previous declaration" } */ +@property (readwrite) int property4; /* Ok */ +@property (readwrite) float property5; /* { dg-warning "type of property .property5. conflicts with previous declaration" } */ +@end + + + |