Question on path from C parser to DECL_INITIAL
Erick Ochoa
eochoa@gcc.gnu.org
Wed Mar 23 12:31:16 GMT 2022
> I'm not sure I understand but no pass walks 'global variables', so you're
> not
> going to "see" the annotation from passes (whatever that means).
>
>
What I mean by walking global variables is that I have a GIMPLE_PASS that
ignores the function sent as an argument and instead just uses a
FOR_EACH_VARIABLE to look at varpool nodes and check if the DECL_INITIAL
has a field set or unset. I can print the variable, and DECL_INITIAL.
However the DECL_INITIAL tree always has the field unset even though I am
setting it during c_sizeof_or_alignof_type. The initialization looks simply
as:
int a = sizeof (foo);
More information about the Gcc
mailing list