This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/41839] New: ICE with lto and incomplete types


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]