This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/41761] lto1: error: type mismatch in component reference (const with non-const)
- 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: 20 Oct 2009 10:16:05 -0000
- Subject: [Bug lto/41761] lto1: error: type mismatch in component reference (const with non-const)
- References: <bug-41761-15165@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-10-20 10:16 -------
Confirmed.
--- t1.i
typedef struct {
int NumPackStreams;
} CSzAr;
void cli_7unz (CSzAr db) { }
--- t2.i
typedef struct {
int NumPackStreams;
} CSzAr;
typedef struct {
CSzAr db;
} CSzArEx;
int SzArEx_Init(CSzArEx *p)
{
return p->db.NumPackStreams;
}
int SzArEx_GetFolderFullPackSize(const CSzArEx *p)
{
return p->db.NumPackStreams;
}
> ./xgcc -B. -fPIC -flto rr/7z.i rr/7zIn.i -shared
In function 'SzArEx_GetFolderFullPackSize':
lto1: error: type mismatch in component reference
const struct CSzAr
struct CSzAr
D.1891_2 = p_1(D)->db.NumPackStreams;
lto1: 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.
ordering is important.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-10-20 10:16:04
date| |
Version|unknown |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41761