Question for getting gimple register for structure?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Question for getting gimple register for structure?

gcc - Help mailing list
Hello,
I read code from gimple stmt, and I want to get the register(in tree type) of structure, for example, in my test code:structure A{int *a;}...int main(){A a1;a1.a=malloc( sizeof(int));...}
When the test code turns into gimple, it looks like this:_8 = malloc (4);
a1.a = _8;
_9 = a1.a;

Although I can use gimple_assign_lhs() to get tree a1.a in a1.a = _8,but I cannot get the same tree a1.a in _9 = a1.a by using gimple_assign_rhs1().Is there another do the thing?