https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105089
--- Comment #5 from Indu Bhagat <ibhagat at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #4) > (In reply to Indu Bhagat from comment #2) > > Regarding this above-mentioned case of two variables (one inside the > > function), CTF emits debug information for file-scope and global-scope > > variables only. So in this example, the declaration of a inside the function > > should not be considered from CTF perspective. > > But a is in the global scope .... > Just not injected into the global scope for that translation unit. [I changed the name of variable inside the function to b, as I need some clarification here.] static const char a[] = "testme"; void foo () { puts (a); } int main() { extern const char b[]; puts (b); foo (); } In this example, -- a is file scope. -- b is function scope (but external linkage). Correct ? CTF does not need to identify C type of variable b. But does need to identify C type of variable a.