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/42025] [4.5 Regression] ICE verify_stmts failed (non-trivial conversion at assignment)



------- Comment #5 from jamborm at gcc dot gnu dot org  2009-11-13 19:34 -------
Yep, this is definitely mine.  Even though I have a fix for the above
testcase, it unfortunately does not work for my all-time favorite
one-filed structures, e.g.: 

typedef struct
{
  void *p;
} Ptr;

struct A
{
  int i;
  union
  {
    Ptr p;
    char *q;
  } u;
};

extern Ptr get_stuff (void);
extern void use_stuff (char *);

static void foo(struct A p, char *q)
{
  if (p.i)
    p.u.p = get_stuff ();
  else
    p.u.q = q;

  use_stuff (p.u.q);
}

void bar(struct A *p, char *q)
{
  foo(*p, q);
}


-- 

jamborm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu dot  |jamborm at gcc dot gnu dot
                   |org                         |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42025


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