This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/17526] [4.0 Regression] locale_facets.cc:47: internal compiler error
- 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: 26 Oct 2004 04:35:34 -0000
- Subject: [Bug middle-end/17526] [4.0 Regression] locale_facets.cc:47: internal compiler error
- References: <20040916205430.17526.wanderer@rsu.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-26 04:35 -------
Here is it reduced further, maybe now someone will look into it now (I can reproduce it with -O2 -fno-
pcc-struct-return on i686-pc-linux-gnu):
struct cset_converter { int func; int cd; };
void abort(void);
struct cset_converter
init_iconv_desc (int i)
{
struct cset_converter ret;
unsigned i1;
char *pair;
if (!i)
{
ret.func = 0;
ret.cd = 0;
return ret;
}
ret.func = 2;
ret.cd = 2;
return ret;
}
struct f
{
struct cset_converter a;
struct cset_converter b;
};
void ff(struct f *a)
{
a->a = init_iconv_desc(0);
a->b = init_iconv_desc(1);
}
int main(void)
{
struct f a;
ff (&a);
if (a.a.func!=0 || a.a.cd !=0)
abort();
if (a.b.func!=2 || a.b.cd !=1)
abort();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17526