Re: New tsan tests.

2013-12-12 Thread Maxim Ostapenko
> Anyway, let's keep the current tests as is, the patch is ok for trunk. Commited in 205925.

Re: New tsan tests.

2013-12-11 Thread Jakub Jelinek
On Wed, Dec 11, 2013 at 03:35:37PM +0400, Konstantin Serebryany wrote: > >> when using what looks like the C subset). > > > > The question is why don't you limit to the subset of the two languages > > when it doesn't cost anything. > > Mostly because of my (our) opinion above. :) > GCC test suite

Re: New tsan tests.

2013-12-11 Thread Konstantin Serebryany
On Wed, Dec 11, 2013 at 3:27 PM, Jakub Jelinek wrote: > On Wed, Dec 11, 2013 at 03:21:32PM +0400, Konstantin Serebryany wrote: >> What's wrong with C++? :) >> Upstream we have 16 .c tests and 106 .cc tests in >> compiler-rt/lib/tsan/lit_tests. >> We typically prefer .cc because imo C++ is a bette

Re: New tsan tests.

2013-12-11 Thread Jakub Jelinek
On Wed, Dec 11, 2013 at 03:21:32PM +0400, Konstantin Serebryany wrote: > What's wrong with C++? :) > Upstream we have 16 .c tests and 106 .cc tests in > compiler-rt/lib/tsan/lit_tests. > We typically prefer .cc because imo C++ is a better language (even That is a matter of opinion. > when using

Re: New tsan tests.

2013-12-11 Thread Konstantin Serebryany
What's wrong with C++? :) Upstream we have 16 .c tests and 106 .cc tests in compiler-rt/lib/tsan/lit_tests. We typically prefer .cc because imo C++ is a better language (even when using what looks like the C subset). But we need some .c tests to make sure that tsan still works w/o C++ run-time. -

Re: New tsan tests.

2013-12-11 Thread Yury Gribov
> I guess I can live with it as is, just was wondering why the tests > were written so carelessly that when they don't really need to test > any C++ features they are still written in C++. Adding Kostya to comment. -Y

Re: New tsan tests.

2013-12-11 Thread Jakub Jelinek
On Wed, Dec 11, 2013 at 03:05:22PM +0400, Yury Gribov wrote: > > This test would fail on strict alignment targets. > > Ok, we'll throw in a dg-skip-if. > > > Why is the test C++ only though? > > Again, why C++ only? > > Ditto. > > Likewise. > > I think main reason is having same versions of code

Re: New tsan tests.

2013-12-11 Thread Yury Gribov
> This test would fail on strict alignment targets. Ok, we'll throw in a dg-skip-if. > Why is the test C++ only though? > Again, why C++ only? > Ditto. > Likewise. I think main reason is having same versions of code with Clang. I had an impression that minimization of changes would be preferre

Re: New tsan tests.

2013-12-11 Thread Jakub Jelinek
On Wed, Dec 11, 2013 at 02:12:35PM +0400, Maxim Ostapenko wrote: > I've added new tests for tsan from LLVM. > --- /dev/null > +++ b/gcc/testsuite/g++.dg/tsan/aligned_vs_unaligned_race.C > @@ -0,0 +1,31 @@ > +/* { dg-do run } */ > + > +#include > +#include > +#include > + > +uint64_t Global[2];