there's no need to emit unreferenced static function, even if they are forced.
Unified · Split
| @@ -7422,9 +7422,9 @@ static void gen_inline_functions(TCCState *s) · 7421 unmodified lines | ||
| 7422 | 7422 | for (i = 0; i < s->nb_inline_fns; ++i) { |
| 7423 | 7423 | fn = s->inline_fns[i]; |
| 7424 | 7424 | sym = fn->sym; |
| 7425 | − if (sym && (sym->c || !(sym->type.t & VT_INLINE) )){ | |
| 7426 | − /* the function was used or forced: generate its code and | |
| 7427 | − convert it to a normal function */ | |
| 7425 | + if (sym && (sym->c || !(sym->type.t & (VT_INLINE | VT_STATIC)) )) { | |
| 7426 | + /* the function was used or forced (and then not internal): | |
| 7427 | + generate its code and convert it to a normal function */ | |
| 7428 | 7428 | fn->sym = NULL; |
| 7429 | 7429 | if (file) |
| 7430 | 7430 | pstrcpy(file->filename, sizeof file->filename, fn->filename); |