summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr15784-4.c
blob: 6549c72055556062cb06a032d1db7405d81da020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
int a (int x) {
	return ~x + 1; /* -x */
}

int b (int x) {
	return -x -1; /* ~x */
}

/* { dg-final { scan-tree-dump "~x_..D.;" "optimized" } } */
/* { dg-final { scan-tree-dump "-x_..D.;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */