------- Comment #2 from rguenth at gcc dot gnu dot org  2009-10-23 13:14 -------
I believe this is because in slaveapp.min.cpp the gimplifier drops the
conversion
in

  <<cleanup_point return <retval> = (struct cNetworkType *) cHead::find
(&networks, s)>>;

as useless (it's a conversion to an incomplete type).

  cNetworkType* findNetwork(const char*) (const char * s)
  {
    struct cNetworkType * D.2114;

    D.2114 = cHead::find (&networks, s);
    return D.2114;
  }

but the LTO type merging completes this type (because of the networktype
declaration in chead.min.cpp) making the conversion no longer useless
[oddly enough the test still requires -O2 to ICE ...].

The fix might be to not complete pointer types this way but only complete
field-decls and parm-decls (which is where the completion is required to
make two function types or two record types compatible).  Note that then
the issue of storage of type INCOMPLETE * vs. COMPLETE * becomes more
appearant (they get assigned different type alias-sets).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41808

Reply via email to