x.h
---
class cObject {
public:
cObject *firstchildp;
};
class cHead : public cObject {
public:
cObject *find(const char *objname) const;
};
chead.min.cpp:
--------------
#include "x.h"
cObject *cHead::find(const char *objname) const
{
return firstchildp;
}
class cNetworkType : public cObject { };
cNetworkType *networktype;
slaveapp.min.cpp:
-----------------
#include "x.h"
extern cHead networks;
class cNetworkType;
inline cNetworkType *findNetwork(const char *s)
{
return (cNetworkType *)networks.find(s);
}
int run(const char *opt_network_name)
{
cNetworkType *network = findNetwork(opt_network_name);
if (!network)
throw 1;
}
> g++ -c slaveapp.min.cpp chead.min.cpp -O2 -flto
> lto1 -quiet slaveapp.min.o chead.min.o -o /dev/null -O2
In file included from :2:0:
slaveapp.min.cpp: In function 'findNetwork':
slaveapp.min.cpp:4:22: error: non-trivial conversion at assignment
struct cNetworkType *
struct cObject *
D.1922_2 = D.1931_5;
slaveapp.min.cpp:4:22: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: error: non-trivial conversion at assignment
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, ice-checking
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41808