This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/85803] [6/7/8/9 Regression] DSE removes live global store


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85803

--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 17 May 2018, ebotcazou at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85803
> 
> Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |NEW
>    Last reconfirmed|                            |2018-05-17
>      Ever confirmed|0                           |1
> 
> --- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> (> I think the only in-tree language eventually specifying behavior for stuff
> > like above is Ada - so, any comments / attempts for testcases where we do
> > not follow language specified behavior?
> 
> I don't think that the language fully does it, it's quite borderline.
> 
> But something changed in DSE yesterday, the following procedure compiled with
> -gnatp -O used to print "SEGV Handler" and now it runs quietly.
> 
> with Ada.Text_IO;
> 
> procedure p is
> 
>    procedure leaf is
>       type Int_Ptr is access all Integer;
>       function n return Int_Ptr is
>       begin return null; end;
> 
>       Data : Int_Ptr := n;
>    begin
>       Data.all := 0;
>    end;
> 
> begin
>    leaf;
> exception
>    when others =>
>       Ada.Text_IO.Put_Line ("SEGV Handler");
> end;

I think that's because we now annotate p.leaf.n with malloc() and
then DSE will remove the store as dead as the result of p.leaf.n
doesn't escape.  Note this will change again once Pratamesh commits
a followup change (that malloc annotation isn't really useful).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]