https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118889
--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > I think variables with 'static' linkage cannot be 'common'? Shouldn't they go into .lcomm, i.e. lcomm_section? What I am trying to achieve is to implement a variable attribute, and to get some noswitch section attached to a VAR_DECL in static storage. Since common static variables are not in lcomm_section, the attribute fails for local variables. FYI, regarding the variable attribute, what also doesn't work is to return a custom noswitch section in TARGET_ASM_SELECT_SECTION since that hook is not called for all static storage VAR_DECLs. More on the background can be found at https://gcc.gnu.org/pipermail/gcc-help/2025-February/143983.html