aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/negneq-3.c
blob: 14546a606c324d712a57d48e07fc8bfbce4d5f3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR tree-optimization/110134 */
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */

int fu(unsigned a, unsigned b)
{
  a = -a;
  b = -b;
  return a == b;
}
int fs(signed a, signed b)
{
  a = -a;
  b = -b;
  return a == b;
}

/* We should have optimized out the a = -; statements. */
/* { dg-final { scan-tree-dump-not "= -a" "optimized" } } */
/* { dg-final { scan-tree-dump-not "= -b" "optimized" } } */