1  /* PR tree-optimization/100834 */
       2  /* { dg-do compile { target size32plus } } */
       3  /* { dg-options "-O2 -Wall" } */
       4  
       5  #define PAGE_SIZE 	4096
       6  #define STACK_SIZE 	PAGE_SIZE
       7  
       8  union registers
       9  {
      10    struct
      11    {
      12      unsigned long r15, r14, r13, r12, r11, r10, r9, r8;
      13      unsigned long rdi, rsi, rbp, unused, rbx, rdx, rcx, rax;
      14    };
      15    unsigned long by_index[16];
      16  };
      17  
      18  struct per_cpu
      19  {
      20    union
      21    {
      22      unsigned char stack[STACK_SIZE];
      23      struct
      24      {
      25        unsigned char __fill[STACK_SIZE - sizeof (union registers)];
      26        union registers guest_regs;
      27      };
      28    };
      29  } __attribute__((aligned (PAGE_SIZE)));
      30  
      31  static inline struct per_cpu *
      32  this_cpu_data (void)
      33  {
      34    return (struct per_cpu *) 0xdeadbeef;
      35  }
      36  
      37  void
      38  foo (void)
      39  {
      40    struct per_cpu *cpu_data = this_cpu_data ();
      41    __builtin_memset (&cpu_data->guest_regs, 0, sizeof (cpu_data->guest_regs));	/* { dg-bogus "is out of the bounds" } */
      42  }