This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/41808] error: non-trivial conversion at assignment
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2009 13:14:49 -0000
- Subject: [Bug lto/41808] error: non-trivial conversion at assignment
- References: <bug-41808-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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