> That *is* the content of the bar method. What exactly do you expect to see
> happening when you assign a class with no members? There's nothing to do!
I was hoping to see the assignment. My example might have been a little
too simple. Here's a slightly more complex example:
foo.hh
class A
{
public:
void yay(){};
};
class foo
{
A a;
public:
void bar(A & aa);
void wik();
};
foo.cc
#include "foo.hh"
void foo::bar(A & aa)
{
a = aa;
}
void foo::wik()
{
a.yay();
}
foo.cc.004t.gimple
void foo::wik() (struct foo * const this)
{
struct A * D.1731;
D.1731 = &this->a;
A::yay (D.1731);
}
void A::yay() (struct A * const this)
{
GIMPLE_NOP
}
void foo::bar(A&) (struct foo * const this, struct A & aa)
{
GIMPLE_NOP
}
Looking at the gimple output there is no way to see that 'a' was
assigned in bar(). So that it can be used in wik(). Am I
misunderstanding something shouldn't there be a way to see the
assignment in bar? Do I have to parse the expression statement or are
things already optimized away and there is no way to get the information
that I seek.
Cheers,
Kyle