diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-24 20:00:09 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-24 20:00:09 +0000 |
commit | 189b339816238133988b6e976a05256f9d2d3426 (patch) | |
tree | 79896db4727874e5decda78a3b61216e7fcbce2f /gcc/testsuite/gcc.dg/tree-ssa/complex-1.c | |
parent | eb71604319e040a4a8aa8521159c342af0cc675c (diff) | |
download | gcc-189b339816238133988b6e976a05256f9d2d3426.tar.gz |
PR middle-end/19953
* builtins.c (fold_builtin_complex_mul, fold_builtin_complex_div): New.
(fold_builtin_1): Call them.
* fold-const.c (fold_complex_mult_parts): Split out from ...
(fold_complex_mult): ... here. Fix typo in both imaginary case.
(fold_complex_div_parts, fold_complex_div): New.
(fold): Use them.
* tree.h (fold_complex_mult_parts, fold_complex_div_parts): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95511 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/complex-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/complex-1.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/complex-1.c b/gcc/testsuite/gcc.dg/tree-ssa/complex-1.c new file mode 100644 index 00000000000..7dff01ce425 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/complex-1.c @@ -0,0 +1,12 @@ +/* Verify that we don't libcall for complex * real. */ +/* { dg-do compile } */ +/* { dg-options "-std=c99 -O -fdump-tree-optimized" } */ + +typedef _Complex float C; + +C foo(C x, float y) +{ + return x * y; +} + +/* { dg-final { scan-tree-dump-times "__mul" 0 "optimized" } } */ |