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 middle-end/17526] [4.0 Regression] locale_facets.cc:47: internal compiler error


------- 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


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