Commit 73617bce by Richard Guenther Committed by Richard Biener

re PR tree-optimization/27090 (FRE does not look past previous type casts)

2006-06-19  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/27090
	* g++.dg/tree-ssa/pr27090.C: New testcase.

From-SVN: r114786
parent 5ff5e6c8
2006-06-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27090
* g++.dg/tree-ssa/pr27090.C: New testcase.
2006-06-19 Roger Sayle <roger@eyesopen.com>
PR target/27861
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized" } */
template <class T>
struct Bar
{
int get() { return static_cast<T*>(this)->get2(); }
};
struct Foo : public Bar<Foo>
{
int get2() { return x; }
int x;
};
int foo(Foo& f)
{
return f.get();
}
/* { dg-final { scan-tree-dump "return f->x;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment