This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/41839] New: ICE with lto and incomplete types
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2009 02:26:44 -0000
- Subject: [Bug lto/41839] New: ICE with lto and incomplete types
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take the following two files:
typedef struct _xmlDict xmlDict;
struct _xmlDict {
int ref_counter;
};
void xmlDictCreate(void) {
xmlDict * dict;
}
--- CUT ---
typedef struct _xmlDict xmlDict;
struct _xmlDoc {
struct _xmlDict *dict;
};
void xmlAddEntity(struct _xmlDoc *a) {
xmlDict * dict = a->dict;
xmlHashCreateDict(0, dict);
}
--- CUT ---
Currently if the first file is included first it ICEs but if the second files
is done first on the command line, it works.
The ICE is:
lto1: error: non-trivial conversion at assignment
struct _xmlDict *
struct _xmlDict *
# VUSE <.MEM_3(D)>
dict_2 = a_1(D)->dict;
--
Summary: ICE with lto and incomplete types
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41839