Commit 4e00d960 by Kenneth Zadeck

re PR c++/36185 (wrong code with -O2 -fgcse-sm)

2008-05-10  Kenneth Zadeck  <zadeck@naturalbridge.com>

    * gcse.c (store_killed_in_insn): Negated call to RTL_CONST_CALL_P.
        
2008-05-10  Kenneth Zadeck  <zadeck@naturalbridge.com>

	PR rtl-optimization/36185
	* g++.dg/opt/pr36185.C

From-SVN: r135159
parent 6e90dc6b
2008-05-10 Kenneth Zadeck <zadeck@naturalbridge.com>
* gcse.c (store_killed_in_insn): Negated call to RTL_CONST_CALL_P.
2008-05-10 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (bdesc_ptest): Removed.
......
......@@ -5987,7 +5987,7 @@ store_killed_in_insn (const_rtx x, const_rtx x_regs, const_rtx insn, int after)
{
/* A normal or pure call might read from pattern,
but a const call will not. */
if (RTL_CONST_CALL_P (insn))
if (!RTL_CONST_CALL_P (insn))
return true;
/* But even a const call reads its parameters. Check whether the
......
<<<<<<< .mine
2008-05-10 Kenneth Zadeck <zadeck@naturalbridge.com>
PR rtl-optimization/36185
* g++.dg/opt/pr36185.C
=======
2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* write_to_null.f90: Rename to write_to_null.F90.
* write_to_null.F90: On Windows, "nul" is the equivalent of the
Unix /dev/null.
>>>>>>> .r135158
2008-05-10 Richard Sandiford <rdsandiford@googlemail.com>
PR rtl-optimization/33642
// PR rtl-optimization/36185
// { dg-do run }
// { dg-options "-O2 -fgcse-sm" }
struct Base {
virtual ~Base() {}
virtual void f() = 0;
};
struct Derived : Base {
Derived();
virtual void f() {}
};
struct Foo {
Foo(Base&);
};
Derived::Derived() {
Foo foo(*this);
}
Foo::Foo(Base& base) {
base.f();
}
int main() {
Derived d;
}
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