Commit ee84cd37 by Marek Polacek Committed by Marek Polacek

re PR debug/54831 (ICE: in vt_add_function_parameter, at var-tracking.c:9412…

re PR debug/54831 (ICE: in vt_add_function_parameter, at var-tracking.c:9412 with -O -fno-split-wide-types -g)

PR54831.

From-SVN: r192218
parent da3202a8
2012-10-08 Marek Polacek <polacek@redhat.com>
PR debug/54831
* var-tracking.c (vt_add_function_parameter): Use condition instead
of gcc_assert.
* testsuite/g++.dg/debug/pr54831.C: New test.
2012-10-08 Dehao Chen <dehao@google.com>
* predict.c (predict_loops): Predict for short-circuit conditions.
......
// PR debug/54831
// { dg-do compile }
// { dg-options "-O -fno-split-wide-types -g" }
struct S
{
int m1();
int m2();
};
typedef void (S::*mptr) ();
mptr gmp;
void bar (mptr f);
void foo (mptr f)
{
f = gmp;
bar (f);
}
......@@ -9404,12 +9404,13 @@ vt_add_function_parameter (tree parm)
if (parm != decl)
{
/* Assume that DECL_RTL was a pseudo that got spilled to
memory. The spill slot sharing code will force the
memory to reference spill_slot_decl (%sfp), so we don't
match above. That's ok, the pseudo must have referenced
the entire parameter, so just reset OFFSET. */
gcc_assert (decl == get_spill_slot_decl (false));
/* If that DECL_RTL wasn't a pseudo that got spilled to
memory, bail out. Otherwise, the spill slot sharing code
will force the memory to reference spill_slot_decl (%sfp),
so we don't match above. That's ok, the pseudo must have
referenced the entire parameter, so just reset OFFSET. */
if (decl != get_spill_slot_decl (false))
return;
offset = 0;
}
......
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