Re: libgcov as shared library and other issues

2018-09-27 Thread Richard Biener
On Wed, Sep 26, 2018 at 11:46 AM Martin Liška  wrote:
>
> On 9/25/18 12:21 AM, Alexander Monakov wrote:
> > Hello,
> >
> > Here's the promised "libgcov summary"; sorry about the delay.
>
> Thank you Alexander, I take it as productive discussion starting point.
>
> >
> > So libgcov has a bit unusual design where:
> >
> >   - on the one hand, the library is static-only, has PIC code and may be 
> > linked
> > into shared libraries,
> >
> >   - almost all gcov symbols have "hidden" visibility so they don't 
> > participate
> > in dynamic linking
> >
> >   - on the other hand, the __gcov_master symbol deliberately has default
> > visibility, presumably with the intention that a running program has 
> > exactly
> > one instance of this symbol, although the exact motivation is unclear 
> > to me.
>
> The only usage I see right now is support of __gcov_reset, __gcov_dump 
> function.
> Which in my opinion should cover all loaded DSOs in an executable.

I guess so.  That could be still implemented some dlsym walking though.

> >
> > This latter point does not reliably work as intended though: there are 
> > scenarios
> > where a dynamically linked program will have multiple __gcov_masters anyway:
> >
> >   - via repeated dlopen(RTLD_LOCAL) with main executable not linked against 
> > libgcov
> > or not exporting libgcov symbols (as in PR 83879)
>
> Here we have a work-around: --dynamic-list-data.
>
> >   - when shared libraries have version scripts that hide their __gcov_master
> >   - when -Bsymbolic is in effect
> >
> >
> > Additionally, indirect call profiling symbols are not hidden either, and 
> > that
> > leads to extra complications. Since there are multiple symbols, during 
> > dynamic
> > linking they may be partially interposed. PR 84107 demonstrates how this 
> > leads
> > to libgcov segfaulting in a fairly simple and legitimate program.
>
> For this one, we have a working work-around: 
> https://gcc.gnu.org/ml/gcc-patches/2018-09/msg00961.html
>
> >
> > Bottom line: static linking code with default-visibility symbols
> > into shared libraries is problematic.
> >
> > So one strategy is to ensure all gcov symbols have hidden visibility. That 
> > would
> > isolate gcov instances in each shared library loaded in the program, and 
> > each
> > library would have the responsibility to write out its counters when 
> > unloaded.
> > Also, __gcov_dump would dump only the counters specific to the current 
> > library.
> >
> > I may be missing something here so it might be nice to unearth why exactly
> > __gcov_master is intended to be global.
> >
> > Another strategy is to introduce libgcov.so and have it host either all 
> > libgcov
> > symbols or just those that by design are required to exist once in the 
> > program.
> >
> > When talking to Richi at the Cauldron I got the impression he'd question if
> > shared libgcov is worth the cost, e.g. would it make any easier for users to
> > mix two libraries, one linked against older libgcov, and another with a 
> > newer
> > (something that doesn't work at all now, but would be nice to support if I
> > understood Richard correctly).
> >
> > Alexander
> >
>
> Note that I'm fan of the shared library. I actually prepared working patch 
> for that.
> So my strategy would be to first install the suggested patch:
> https://gcc.gnu.org/ml/gcc-patches/2018-09/msg00961.html
>
> and then we Richi is fine, we can also add the shared library patch.

I don't stand in the way of a shared libgcov I just think it may be not worth
the trouble...

Richard.

> Martin


Re: Implementing p0515 - spaceship operator

2018-09-27 Thread Nathan Sidwell

On 9/26/18 8:00 AM, Jason Merrill wrote:

On Mon, Sep 3, 2018 at 5:04 PM, Tim van Deurzen  wrote:

I must confess that in the last months I've not been able to find much time
(I do this in my spare time) to work on this. Part of the problem is also
that my new employer hasn't yet provided a written copyright waiver for the
FSF, though they have agreed and my contract already works out well in that
regard.


Any progress on this?


Tim and I are at the same conference,  we've been chatting.

nathan

--
Nathan Sidwell


Quadmath

2018-09-27 Thread andy hall
Dear GCC developers,

I would just like to say a massive thanks for the work that led to the 
development of the Quadmath libraries. I have been doing  my own research 
project with Matlab and last Christmas I ran out of numbers. I have developed a 
set of formulae that relate Planck’s constant, the speed of light and the 
fundamental constants of electromagnetism, Z0, epsilon0 and mew0 but I was 
stuck with only 1 significant figures. As a result of installing gcc on my 
Cygwin installation and finding the quadmath libraries I have been able to 
prove agreement of my formulae in terms of reciprocal self-consistency to 93 
significant digits. I was previously stuck with double precision based on 32 
bit assumed architecture that gave me 15 decimal digits. I know have quadmath 
on my 64 bit machine giving me way more than I ever expected and the numbers 
seems to stack up. I hope I will be able to either publish something in the 
future, or make some money such that I can make a donation. In any event it has 
been a lot of fun. Once again, thank you.

Andy

Sent from Mail for Windows 10



gcc-7-20180927 is now available

2018-09-27 Thread gccadmin
Snapshot gcc-7-20180927 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/7-20180927/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 7 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-7-branch 
revision 264679

You'll find:

 gcc-7-20180927.tar.xzComplete GCC

  SHA256=5cfeb7288afa6f3bb753c2e049789ed95744a63c4dcb1946ccbc32ab1830cb7f
  SHA1=fa0bcc4eb97ebfd36485ae309d4e9925f13dac9e

Diffs from 7-20180920 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-7
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.