view gcc/testsuite/gcc.dg/tree-ssa/sra-20.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile { target int32plus } } */
/* { dg-options "-O1 -Wall" } */
/* PR/70013, SRA of constant-pool loads removes initialization of part of d.  */
#pragma pack (1)
struct S0 {
  unsigned f0 : 17;
};

int c;

int
main (int argc, char **argv)
{
  struct S0 d[] = { { 1 }, { 2 } };
  struct S0 e = d[1];

  c = d[0].f0;
  __builtin_printf ("%x\n", e.f0);
  return 0;
}