aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/gcc/testsuite/gcc.dg/minmax-1.c
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-06-17 11:09:54 -0700
committerDan Albert <danalbert@google.com>2015-06-17 14:15:22 -0700
commitf378ebf14df0952eae870c9865bab8326aa8f137 (patch)
tree31794503eb2a8c64ea5f313b93100f1163afcffb /gcc-4.4.3/gcc/testsuite/gcc.dg/minmax-1.c
parent2c58169824949d3a597d9fa81931e001ef9b1bd0 (diff)
downloadtoolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.tar.gz
toolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.tar.bz2
toolchain_gcc-f378ebf14df0952eae870c9865bab8326aa8f137.zip
Delete old versions of GCC.
Change-Id: I710f125d905290e1024cbd67f48299861790c66c
Diffstat (limited to 'gcc-4.4.3/gcc/testsuite/gcc.dg/minmax-1.c')
-rw-r--r--gcc-4.4.3/gcc/testsuite/gcc.dg/minmax-1.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/gcc-4.4.3/gcc/testsuite/gcc.dg/minmax-1.c b/gcc-4.4.3/gcc/testsuite/gcc.dg/minmax-1.c
deleted file mode 100644
index e279c0e20..000000000
--- a/gcc-4.4.3/gcc/testsuite/gcc.dg/minmax-1.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-fdump-tree-original" } */
-
-/* Check that MIN-MAX and MAX-MIN combinations are folded. */
-
-extern void abort (void);
-
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-
-int f1(int a, int b)
-{
- return MIN (MAX (a, b), b); /* == b */
-}
-
-int f2(int a, int b)
-{
- return MAX (MIN (a, b), b); /* == b */
-}
-
-int f3(int a, int b)
-{
- return MIN (MAX (b, a), b); /* == b */
-}
-
-int f4(int a, int b)
-{
- return MAX (MIN (b, a), b); /* == b */
-}
-
-
-int g1(int a, int b)
-{
- return MIN (a, MAX (a, b)); /* == a */
-}
-
-int g2(int a, int b)
-{
- return MAX (a, MIN (a, b)); /* == a */
-}
-
-int g3(int a, int b)
-{
- return MIN (a, MAX (b, a)); /* == a */
-}
-
-int g4(int a, int b)
-{
- return MAX (a, MIN (b, a)); /* == a */
-}
-
-int main(void)
-{
- if (f1 (1, 2) != 2)
- abort ();
-
- if (f2 (1, 2) != 2)
- abort ();
-
- if (f3 (1, 2) != 2)
- abort ();
-
- if (f4 (1, 2) != 2)
- abort ();
-
- if (g1 (1, 2) != 1)
- abort ();
-
- if (g2 (1, 2) != 1)
- abort ();
-
- if (g3 (1, 2) != 1)
- abort ();
-
- if (g4 (1, 2) != 1)
- abort ();
-
- return 0;
-}
-
-/* { dg-final { scan-tree-dump-times "MIN_EXPR" 0 "original"} } */
-/* { dg-final { scan-tree-dump-times "MAX_EXPR" 0 "original"} } */
-/* { dg-final { cleanup-tree-dump "original" } } */