view gcc/testsuite/gcc.dg/dse.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 } */
/* { dg-options "-O2 -fdump-tree-dse1-details" } */

#define N 256

struct
{
  int x;
  int y;
} S[100];

int z[100];

int
foo (void)
{
  int i;
  int x, y;

  S[5].x = 0;
  S[5].y = 0;

  x = 5 + z[0];
  y = z[0];

  S[5].x = x;
  S[5].y = y;
}

/* { dg-final { scan-tree-dump-times "Deleted dead store" 2 "dse1" } } */