On 11/23/2016 09:13 AM, Martin Liška wrote:
Hello.
As described in the PR, the patch fixes profiled bootstrap on x86_64-linux-gnu.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. And
profiled bootstrap on x86_64-linux-gnu finishes successfully.
Ready to be installed?
Martin
0001-Fix-PR-bootstrap-78493.patch
From 8b7cd9a83cd14f7a15f39e105ccd78e143ec84f2 Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Wed, 23 Nov 2016 14:08:52 +0100
Subject: [PATCH] Fix PR bootstrap/78493
gcc/ChangeLog:
2016-11-23 Martin Liska <mli...@suse.cz>
PR bootstrap/78493
* vec.h (~auto_vec): Do va_heap::release just if
this->m_vec == &m_auto. That would help compiler not to
trigger -Werror=free-nonheap-object.
It's probably the case that the profiling information inhibited a jump
thread optimization (path was considered cold and thus
duplication/isolation not profitable) which left the dead path in the IL.
I don't like that we're essentially inlining the ::release method. At
the least we should have a pair of comments. In the destructor we
should indicate why we've inlined the release method. In the release
method we should make a note that if the release method is changed that
a suitable change to the auto_vec destructor may be needed.
Alternately, given all the problems we have with this kind of problem,
we should seriously consider throttling back what we consider an error
during a profiled bootstrap. This kind of stuff is a maintenance
nightmare with minimal value.
jeff