https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96791

--- Comment #8 from acsawdey at gcc dot gnu.org ---
Another small test case, reduced from my compile failure of c/c-typeck.c and
modified to provoke truncation from POImode to various other modes:

typedef int *a;
struct b { a ba; };
enum c { c1=1 };
struct e {
  union eu {
    char f_char;
    short f_short;
    int f_int;
    long f_long;
    int *f_ptr;
    long long f_ll;
  } u;
  c g;
  a h;
  b i;
};
a d(bool, bool, bool);
e j(int, e, bool, bool);
void k() {
  int l;
  for (;;) {
    e expr;
    l = sizeof(struct e);
    expr = j(l, expr, true, false);
    d(expr.u.f_char, false, __null);
    d(expr.u.f_short, false, __null);
    d(expr.u.f_int, false, __null);
    d(expr.u.f_long, false, __null);
    d(expr.u.f_ptr, false, __null);
    d(expr.u.f_ll, false, __null);
  }
}

Reply via email to