summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/fold-plusmult.c
blob: d584b95887466e50202bf49dd5cf74e7a5c0a647 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-fdump-tree-original" } */

int test1 (int a)
{
  return 2*a + 2*a;
}

int test2 (int a)
{
  return (a + a)*2;
}

/* { dg-final { scan-tree-dump-times "<a> \\\* 4" 2 "original" } } */
/* { dg-final { cleanup-tree-dump "original" } } */