https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99057
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- And this one please for C FE: $ cat wslay.i typedef long unsigned int size_t; typedef struct { } __sigset_t; typedef int (*__compar_fn_t) (const void *, const void *); extern __inline __attribute__ ((__gnu_inline__)) void * bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) { size_t __l, __u, __idx; int __comparison; while (__l < __u) { if (__comparison < 0) __u = __idx; else if (__comparison > 0) __l = __idx + 1; } } $ gcc wslay.i -O -Wduplicated-cond -fsyntax-only -wrapper valgrind,--leak-check=yes ==26658== Memcheck, a memory error detector ==26658== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==26658== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info ==26658== Command: /home/marxin/bin/gcc/lib/gcc/x86_64-pc-linux-gnu/11.0.0/cc1 -fpreprocessed wslay.i -quiet -dumpdir a- -dumpbase wslay.i -dumpbase-ext .i -mtune=generic -march=x86-64 -O -Wduplicated-cond -fsyntax-only -o /dev/null ==26658== ==26658== ==26658== HEAP SUMMARY: ==26658== in use at exit: 540,404 bytes in 2,250 blocks ==26658== total heap usage: 3,394 allocs, 1,144 frees, 1,156,250 bytes allocated ==26658== ==26658== 40 bytes in 1 blocks are definitely lost in loss record 18 of 741 ==26658== at 0x483977F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==26658== by 0x1ADADFF: xrealloc (xmalloc.c:177) ==26658== by 0x8B7F55: reserve<tree_node*> (vec.h:290) ==26658== by 0x8B7F55: reserve (vec.h:1778) ==26658== by 0x8B7F55: safe_push (vec.h:1887) ==26658== by 0x8B7F55: c_parser_if_statement (c-parser.c:6499) ==26658== by 0x8B7F55: c_parser_statement_after_labels(c_parser*, bool*, vec<tree_node*, va_heap, vl_ptr>*) (c-parser.c:6108) ==26658== by 0x8B856A: c_parser_compound_statement_nostart(c_parser*) (c-parser.c:5788) ==26658== by 0x8D2C6D: c_parser_compound_statement(c_parser*, unsigned int*) (c-parser.c:5597) ==26658== by 0x8B6569: c_parser_statement_after_labels(c_parser*, bool*, vec<tree_node*, va_heap, vl_ptr>*) (c-parser.c:6102) ==26658== by 0x8D5993: c_parser_statement (c-parser.c:6074) ==26658== by 0x8D5993: c_parser_c99_block_statement(c_parser*, bool*, unsigned int*) (c-parser.c:6314) ==26658== by 0x8D66E6: c_parser_while_statement(c_parser*, bool, unsigned short, bool*) (c-parser.c:6634) ==26658== by 0x8B6C90: c_parser_statement_after_labels(c_parser*, bool*, vec<tree_node*, va_heap, vl_ptr>*) (c-parser.c:6114) ==26658== by 0x8B856A: c_parser_compound_statement_nostart(c_parser*) (c-parser.c:5788) ==26658== by 0x8D2C6D: c_parser_compound_statement(c_parser*, unsigned int*) (c-parser.c:5597) ==26658== by 0x8D441F: c_parser_declaration_or_fndef(c_parser*, bool, bool, bool, bool, bool, tree_node**, vec<c_token, va_heap, vl_ptr>, bool, tree_node*, oacc_routine_data*, bool*) (c-parser.c:2539)