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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase:
typedef void *Lisp_Word;
typedef Lisp_Word Lisp_Object;
struct Lisp_Cons
{
  union
  {
    struct { Lisp_Object car; union { Lisp_Object cdr; struct Lisp_Cons *chain;
} u; } s;
    char _Alignas (8) gcaligned;
  } u;
};
enum Lisp_Type { Lisp_Cons = 3 };
extern Lisp_Object Vframe_list;
inline enum Lisp_Type
XTYPE (Lisp_Object a)
{
  return (enum Lisp_Type) ((__INTPTR_TYPE__) (a) & ~(- (1 << 3)));
}
inline _Bool
CONSP (Lisp_Object x)
{
  return XTYPE (x) == Lisp_Cons;
}
inline struct Lisp_Cons *
XCONS (Lisp_Object a)
{
  return (struct Lisp_Cons *) __builtin_assume_aligned ((char *) (a) -
Lisp_Cons, 8);
}
extern Lisp_Object do_switch_frame (Lisp_Object);

void
delete_frame (Lisp_Object frame)
{
  Lisp_Object frames, frame1;
  Lisp_Object tail;
  ((CONSP (Vframe_list)) ? (void) 0 : __builtin_unreachable ());
  for ((tail) = Vframe_list; (CONSP (tail) && (frame1 = XCONS (tail)->u.s.car,
1)); tail = XCONS (tail)->u.s.u.cdr)
    ;
  do_switch_frame (frame1);
}

Reply via email to