RFR: 8151841: Build needs additional flags to compile with GCC 6

Severin Gehwolf sgehwolf at redhat.com
Tue Mar 15 15:07:25 UTC 2016

On Mon, 2016-03-14 at 18:55 -0400, Kim Barrett wrote:
> > 
> > 2. A number of optimisations in GCC 6 lead to a broken JVM. We need to
> > add -fno-delete-null-pointer-checks and -fno-lifetime-dse to get a
> > working JVM.

> I don't have any suggestions for why gcc6 might be having problems
> because of -flifetime-dse, or how to find them.  Do you?  This seems
> to be a relatively new option, having been introduced in gcc4.9(?),
> and seems to have always been on by default since being introduced.
> Again, this could be a matter of gcc6 doing a better job of
> recognizing relevant situations, or a bug in that not-yet-released
> version.


GCC 6 probably does a better job at dead store elimination. Here is the
 Fedora bug and the comment from Andrew Haley where we discovered this:

Example (for a debug build):

n->_in is being assigned before it's constructed. In JDK 8 there is n-
>_out being assigned to outside the ifdef ASSERT.


More information about the hotspot-dev mailing list