[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-17 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

--- Comment #10 from Martin Jambor  ---
OK, this is new: The problem is that topological ordering on which
IPA-CP operates is bogus, reverting Martin's r272115 restored Ada LTO
bootstrap for me.

I however tried breakpointing in IPA-CP's ignore_edge at the one edge
I assumed would be problematic and it did not return true, so I have
to look a bit further.

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-17 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

--- Comment #9 from Jan Hubicka  ---
> The gcc_unreachable in ipcp_verify_propagated_values gets tripped over
> if there is a TOP lattice in any of the IPA-CP scalar constant
> propagation lattices after the propagation.
> 
> All non-local nodes get all their lattices set to VARIABLE and all
> local nodes should either be removed by unreachable code or get
> another lattice value from their callers.  Therefore, this assert
> triggers when a function should have been removed by unreachable node
> removal or if IPA-CP has a bad notion of about locality of a node,
> usually the former.

Yep, in the dumps I also included the callgraph dump from previous
pass so you can check if there is a dead node in it.

Honza

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-17 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

Martin Jambor  changed:

   What|Removed |Added

 CC||jamborm at gcc dot gnu.org

--- Comment #8 from Martin Jambor  ---
(In reply to Jan Hubicka from comment #3)
> The failing check is Martin (Jambor's) sanity check of ipa-cp, so I am
> adding him to CC: at very first glance it looks like ipa bug exposed by LTO.
> 

The gcc_unreachable in ipcp_verify_propagated_values gets tripped over
if there is a TOP lattice in any of the IPA-CP scalar constant
propagation lattices after the propagation.

All non-local nodes get all their lattices set to VARIABLE and all
local nodes should either be removed by unreachable code or get
another lattice value from their callers.  Therefore, this assert
triggers when a function should have been removed by unreachable node
removal or if IPA-CP has a bad notion of about locality of a node,
usually the former.

Yesterday I ran out of space in /tmp when trying to bootstrap Ada, I
will try again today and have a quick look.

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-16 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

--- Comment #7 from Jan Hubicka  ---
Created attachment 46490
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46490&action=edit
dumps

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

--- Comment #6 from Eric Botcazou  ---
> Perhaps it may make sense to compile the non-compliant units with
> -fno-lto so we stay safe?

I'll have a look, but that's probably overkill.

> (while working on alias oracle I would like to be able to LTO test Ada
> since it has some specialities in this area)

Makes sense of course.  The gnat.dg testsuite should already contain testcases
for the modifications made to the middle-end in order to help Ada.

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-16 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

--- Comment #5 from Jan Hubicka  ---
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889
> 
> Eric Botcazou  changed:
> 
>What|Removed |Added
> 
>  Status|UNCONFIRMED |NEW
>Last reconfirmed||2019-06-16
>  Ever confirmed|0   |1
> 
> --- Comment #4 from Eric Botcazou  ---
> > BTW are all those type mismatch waning actually correct? I was looking into
> > the Ada manual for C compatibility and i think we implement it correctly, so
> > there should be no mismatches if language standard is followed. It is easily
> > possible that I missed something important.
> 
> Most warnings are in units implementing the low-level support of the language,
> in particular exceptions, so this is not pure Ada.  A few others could be
> fixed.

Perhaps it may make sense to compile the non-compliant units with
-fno-lto so we stay safe?
> 
> > BTW -fchecking=0 lets me to finish the build, but later I get wrong -fPIC
> > for ada runtime, which also seem new.
> 
> You probably need to restart the build of the runtime after removing the
> various timestamps in $(builddir)/gcc and $(builddir)/$(target)/libada.

Will try :)
(while working on alias oracle I would like to be able to LTO test Ada
since it has some specialities in this area)

Honza

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-06-16
 Ever confirmed|0   |1

--- Comment #4 from Eric Botcazou  ---
> BTW are all those type mismatch waning actually correct? I was looking into
> the Ada manual for C compatibility and i think we implement it correctly, so
> there should be no mismatches if language standard is followed. It is easily
> possible that I missed something important.

Most warnings are in units implementing the low-level support of the language,
in particular exceptions, so this is not pure Ada.  A few others could be
fixed.

> BTW -fchecking=0 lets me to finish the build, but later I get wrong -fPIC
> for ada runtime, which also seem new.

You probably need to restart the build of the runtime after removing the
various timestamps in $(builddir)/gcc and $(builddir)/$(target)/libada.

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-16 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

Jan Hubicka  changed:

   What|Removed |Added

 CC||mjambor at suse dot cz

--- Comment #3 from Jan Hubicka  ---
The failing check is Martin (Jambor's) sanity check of ipa-cp, so I am adding
him to CC: at very first glance it looks like ipa bug exposed by LTO.

BTW are all those type mismatch waning actually correct? I was looking into the
Ada manual for C compatibility and i think we implement it correctly, so there
should be no mismatches if language standard is followed. It is easily possible
that I missed something important.

BTW -fchecking=0 lets me to finish the build, but later I get wrong -fPIC for
ada runtime, which also seem new.

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-16 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

Jan Hubicka  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #2 from Jan Hubicka  ---
*** Bug 90891 has been marked as a duplicate of this bug. ***

[Bug lto/90889] snapshot 20190614 fails to build Ada with LTO

2019-06-15 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90889

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
  Component|ada |lto
Summary|ada: snapshot 20190614  |snapshot 20190614 fails to
   |fails to build with LTO |build Ada with LTO

--- Comment #1 from Eric Botcazou  ---
Wrong component.