diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-05-02 14:43:35 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-05-02 14:43:35 +0000 |
commit | 34efdaf078b01a7387007c4e6bde6db86384c4b7 (patch) | |
tree | d503eaf41d085669d1481bb46ec038bc866fece6 /gcc/testsuite/gcc.dg/min.c | |
parent | f733cf303bcdc952c92b81dd62199a40a1f555ec (diff) | |
download | gcc-tarball-master.tar.gz |
gcc-7.1.0gcc-7.1.0
Diffstat (limited to 'gcc/testsuite/gcc.dg/min.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/min.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/min.c b/gcc/testsuite/gcc.dg/min.c new file mode 100644 index 0000000000..d8472702e9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/min.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +static inline int +min (int a, int b) +{ + return a < b ? a : b; +} + +int +test_00 (int a) +{ + return min (a, a + 8); +} + +int +test_01 (int a) +{ + return min (a, a - 8); +} + +/* { dg-final { scan-tree-dump-not "MIN_EXPR" "optimized" } } */ |