summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr15784-3.c
diff options
context:
space:
mode:
authorphython <phython@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-13 06:41:01 +0000
committerphython <phython@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-13 06:41:01 +0000
commit6cc6c0fe4f7fb42e2ec473a0117e9d067118beb1 (patch)
tree02d5b0b7143e79e01805b4aa33e9174807bd5880 /gcc/testsuite/gcc.dg/pr15784-3.c
parentd4ff2b6f88cb83ad36d1715e6d6ffb253a7edb20 (diff)
downloadgcc-6cc6c0fe4f7fb42e2ec473a0117e9d067118beb1.tar.gz
2005-02-13 James A. Morrison <phython@gcc.gnu.org>
* gcc.dg/pr15784-1.c, gcc.dg/pr15784-2.c, gcc.dg/pr15784-3.c: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94978 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr15784-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr15784-3.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr15784-3.c b/gcc/testsuite/gcc.dg/pr15784-3.c
new file mode 100644
index 00000000000..ee90760fcb0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr15784-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-generic" } */
+/* Test for folding abs(x) where appropriate. */
+#define abs(x) x > 0 ? x : -x
+extern double fabs (double);
+
+int a (float x) {
+ return fabs(x) >= 0.0;
+}
+
+/* { dg-final { scan-tree-dump-times "ABS_EXPR" 1 "generic" } } */