I have scenario like this:
int open_ext2 () {}
int close_ext2 () {}
int read_ext2 () {}
int write_ext2 () {}
const struct fs_callbacks FS = {
open_file: open_ext2,
close_file: close_ext2,
read_bytes: read_ext2,
write_bytes: write_ext2
};
void main(){
FS.close_file();
}
When I look at the gimple representation (compiled with -fdump-tree-all
)
I see something like this:
D.1796 = close_ext2;
D.1796 ();
What I do not get is where happens the assignment open_file: open_ext2
My questions
- How GCC is doing this?
- In what pass does it happen ?
- Is there a way to figure out the mapping label -> member function?