diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr46499-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr46499-1.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr46499-1.c b/gcc/testsuite/gcc.dg/pr46499-1.c new file mode 100644 index 000000000..9815272e6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr46499-1.c @@ -0,0 +1,31 @@ +/* PR middle-end/46499 */ +/* { dg-do run } */ +/* { dg-options "-O -fno-omit-frame-pointer -fno-tree-ccp -fno-tree-dominator-opts -finline-small-functions" } */ + +extern void abort (void); + +int count = 0; + +int +foo (void) +{ + count++; + return 0; +} + +int +bar (void) +{ + count++; + return 0; +} + +int +main () +{ + if ((foo () == 1) & (bar () == 1)) + abort (); + if (count != 2) + abort (); + return 0; +} |