diff options
author | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-06-19 19:09:57 -0700 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2006-06-19 19:09:57 -0700 |
commit | 73dab33bce6cc186f05ac0cf45e42c58f9086b3c (patch) | |
tree | 70fce683565be251ca9b5d49fd3d814bfcf5a973 /gcc/testsuite | |
parent | 48e2909e4a9d520a083d213999c926bf135ebed2 (diff) | |
download | gcc-73dab33bce6cc186f05ac0cf45e42c58f9086b3c.zip gcc-73dab33bce6cc186f05ac0cf45e42c58f9086b3c.tar.gz gcc-73dab33bce6cc186f05ac0cf45e42c58f9086b3c.tar.bz2 |
re PR middle-end/28075 (inliner introduces unnecessary type conversions)
2006-06-19 Andrew Pinski <pinskia@gmail.com>
PR middle-end/28075
* tree-inline.c (setup_one_parameter): Strip useless
type conversion before adding it to the IR.
(declare_return_variable): Likewise.
2006-06-19 Andrew Pinski <pinskia@gmail.com>
PR middle-end/28075
* gcc.dg/tree-ssa/inline-1.c: New test.
From-SVN: r114801
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/inline-1.c | 25 |
2 files changed, 31 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 50ead2c..96c8628 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2006-06-19 Anatoly Sokolov <aesok@post.ru> +2006-06-19 Andrew Pinski <pinskia@gmail.com> + + PR middle-end/28075 + * gcc.dg/tree-ssa/inline-1.c: New test. + +2006-06-19 Anatoly Sokolov <aesok@post.ru> * gcc.dg/pr18241-1.c: Use __SIZE_TYPE__ instead of unsigned long in malloc prototype; remove XFAIL. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-1.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-1.c new file mode 100644 index 0000000..bbf7e83 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-1.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-final_cleanup" } */ + + +typedef struct { + double min; + double max; +} interval; +inline interval add(interval x, interval y) __attribute__((always_inline)); +inline interval add(interval x, interval y) +{ + interval r; + r.min = x.min + y.min; + r.max = x.max + y.max; + return r; +} +interval foo (interval a, interval b, interval c) +{ + return add (a, add (b, c)); +} + + +/* { dg-final { scan-tree-dump-times "\(struct interval\)" 0 "final_cleanup"} } */ +/* { dg-final { cleanup-tree-dump "final_cleanup" } } */ + |