https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116933
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- Note that: location_t loc = EXPR_LOCATION (decl); is equivalent to: location_t loc = UNKNOWN_LOCATION; I presume that DECL_SOURCE_LOCATION was meant instead here.