diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr20130-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr20130-1.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr20130-1.c b/gcc/testsuite/gcc.dg/pr20130-1.c new file mode 100644 index 000000000..976372560 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr20130-1.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-fdump-tree-gimple" } */ +int z (int a) { + return a * -1; +} + +int x (int a) { + return -1 * a; +} + +int y (int a) { + return -(-1 * -a); +} +/* { dg-final { scan-tree-dump-times "-a" 3 "gimple" } } */ +/* { dg-final { cleanup-tree-dump "gimple" } } */ |