diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr15784-4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr15784-4.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr15784-4.c b/gcc/testsuite/gcc.dg/pr15784-4.c new file mode 100644 index 000000000..6549c7205 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr15784-4.c @@ -0,0 +1,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" } } */ |