On Wed, 2020-03-18 at 23:51 +0100, Andrea Corallo wrote: > Hi all, > > Updated version of the patch mainly addressing comments on the > concurrency issues. > > I came to the conclusions that the caching should be done in the > function that we decide to be thread safe. However I haven't touched > parse_basever in any direction in the hope of having this still in > stage4. As result I've mostly applied the mutex solution. > > 'make check-jit' runs clean > > Bests > > Andrea > > gcc/jit/ChangeLog > 2020-??-?? Andrea Corallo <andrea.cora...@arm.com> > David Malcolm <dmalc...@redhat.com> > > * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag > plus add version paragraph. > * libgccjit++.h (namespace gccjit::version): Add new namespace. > * libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor) > (gcc_jit_version_patchlevel): New functions. > * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro. > (gcc_jit_version_major, gcc_jit_version_minor) > (gcc_jit_version_patchlevel): New functions. > * libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag. > > gcc/testsuite/ChangeLog > 2020-??-?? Andrea Corallo <andrea.cora...@arm.com> > > * jit.dg/test-version.c: New testcase. > * jit.dg/all-non-failing-tests.h: Add test-version.c.
> diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h > b/gcc/testsuite/jit.dg/all-non-failing-tests.h > index 0272e6f846f..cba4ac51cc9 100644 > --- a/gcc/testsuite/jit.dg/all-non-failing-tests.h > +++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h > @@ -8,6 +8,13 @@ > hooks provided by each test case. */ > #define COMBINED_TEST > > +/* test-version.c */ > +#define create_code create_code_version > +#define verify_code verify_code_version > +#include "test-version.c" > +#undef create_code > +#undef verify_code > + > /* test-accessing-bitfield.c */ > #define create_code create_code_accessing_bitfield > #define verify_code verify_code_accessing_bitfield Please add the new test to the header in its alphabetical location, i.e. between: /* test-vector-types.cc: We don't use this, since it's C++. */ and /* test-volatile.c */ An entry also needs to be added to the "testcases" array at the end of the header (again, in the alphabetical-sorted location). OK by me with that change (assuming you re-test the patch), but given we're in stage 4, it's probably worth double-checking with a release manager. I've CCed Jakub and Richi. Dave