[4.0 PATCH] Disable Tree-SRA for the Ada compiler

Eric Botcazou ebotcazou@adacore.com
Sun Feb 27 07:21:00 GMT 2005


On Saturday 26 February 2005 16:20, Richard Kenner wrote:
>     IIRC it's related to discriminated types and subtypes.  Components may
>     be lost during the transition between them and SRA doesn't like that
>     at all.
>
> Since you've investigated this, can you give me the results of your
> investigation so I don't have to start from scratch?  Specifically, show
> me what was miscompiled.

29.ch:

<bb 92>:
  D.1765.d1 = 8;
  D.1765.d2 = 8;
  D.1765.b = 0;
  D.1765.s = D.1769;
  D.1765.c1 = D.1770_932;
  D.1771 = VIEW_CONVERT_EXPR<struct cdd2a02__test2__T165b>(D.1765);
  y1 = D.1771;
  y1.22_943 = (struct cdd2a02__parent *) &y1;
  s.23_944 = (struct ada__streams__root_stream_type * const) &s;
  cdd2a02__parentSO (s.23_944, y1.22_943, 2) [static-chain: &FRAME.49];

D.1771 is SRA-ized, but struct cdd2a02__test2__T165b has only 3 components 
instead of the 5 components of D.1765.  So 2 components are not copied.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list