diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr51879-18.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr51879-18.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr51879-18.c b/gcc/testsuite/gcc.dg/pr51879-18.c new file mode 100644 index 00000000000..95629f12261 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr51879-18.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-pre -fno-tree-copy-prop -fno-tree-dominator-opts -fno-tree-copyrename" } */ + +extern int foo (void); + +void bar (int c, int *p) +{ + int *q = p; + + if (c) + *p = foo (); + else + *q = foo (); +} + +/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */ +/* { dg-final { cleanup-tree-dump "pre" } } */ |