view gcc/testsuite/gcc.dg/tree-ssa/pr23401.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-fdump-tree-gimple" } */

struct f
{
  struct {
      int i;
  } ff[10];
};

struct f g;
int ffff(int i)
{
  int t1 = 0;
  int i1 = g.ff[t1].i;
  int i2 = g.ff[i].i;
  return i1 + i2;
}

/* We should not use extra temporaries apart from for i1 + i2.  */

/* { dg-final { scan-tree-dump-times "int" 5 "gimple" } } */
/* { dg-final { scan-tree-dump-times "int D\\\." 1 "gimple" } } */