diff options
Diffstat (limited to 'gcc-4.4.3/gcc/testsuite/g++.dg/thread-ann/thread_annot_lock-61.C')
-rw-r--r-- | gcc-4.4.3/gcc/testsuite/g++.dg/thread-ann/thread_annot_lock-61.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.4.3/gcc/testsuite/g++.dg/thread-ann/thread_annot_lock-61.C b/gcc-4.4.3/gcc/testsuite/g++.dg/thread-ann/thread_annot_lock-61.C new file mode 100644 index 000000000..11f6308eb --- /dev/null +++ b/gcc-4.4.3/gcc/testsuite/g++.dg/thread-ann/thread_annot_lock-61.C @@ -0,0 +1,15 @@ +// Test the fix for a bug introduced by the support of pass-by-reference +// paramters. +// { dg-do compile } +// { dg-options "-Wthread-safety -O" } + +#include "thread_annot_common.h" + +struct Foo { Foo & operator<< (bool) {} }; +struct Bar { Foo & func () {} }; +struct Bas { void operator& (Foo &) {} }; +void mumble() +{ + Bas() & Bar().func() << "" << ""; + Bas() & Bar().func() << ""; +} |