https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69650
--- Comment #49 from Roger Orr <rogero at howzatt dot demon.co.uk> --- Alas, valgrind finds nothing untoward. make MAKEINFO=true STAGE1_CXXFLAGS="-g -O0" clean-stage1 make MAKEINFO=true STAGE1_CXXFLAGS="-g -O0" all-stage1 valgrind /var/tmp/gcc-trunk-234481/build/gcc/cc1plus -fpreprocessed direct.ii -quiet -dumpbase direct.ii -mtune=generic -march=x86-64 -auxbase direct -O3 -Werror -std=c++14 -fmax-errors=1 -o /tmp/ccGReQOF.s I've also tried a build with -fsanitize=address,undefined but this too reports no problems. Running under gdb and breaking at libcpp/directives.c:1057 I can see the following: (gdb) p MAIN_FILE_P(map) $17 = true # This is the reason why it is trying to print the message if (reason == LC_LEAVE) { const line_map_ordinary *from; if (MAIN_FILE_P (map) || (/*...*/)) { cpp_warning ( // ... (gdb) p map $18 = (const line_map_ordinary *) 0x7fffec6ddfe0 (gdb) p *map $19 = {<line_map> = {start_location = 2779096485, reason = 165}, to_file = 0xa5a5a5a5a5a5a5a5 <error: Cannot access memory at address 0xa5a5a5a5a5a5a5a5>, to_line = 2779096485, included_from = -1515870811, sysp = 165 '▒', m_column_and_range_bits = 165, m_range_bits = 165} # These values look concerning ... what do they mean and where do they come from?! 'map' comes from line 979: const line_map_ordinary *map = LINEMAPS_LAST_ORDINARY_MAP (line_table); (gdb) p line_table $20 = (line_maps *) 0x7fffecf8b000 (gdb) p *line_table $21 = {info_ordinary = {maps = 0x7fffec9f4000, allocated = 16384, used = 4097, cache = 4096}, info_macro = {maps = 0x0, allocated = 0, used = 0, cache = 0}, depth = 3, trace_includes = false, highest_location = 485446816, highest_line = 485446816, max_column_hint = 256, reallocator = 0x25409c0 <realloc_for_line_map(void*, size_t)>, round_alloc_size = 0x11bf0fa <ggc_round_alloc_size(unsigned long)>, location_adhoc_data_map = {htab = 0x60b00000ad80, curr_loc = 4140, allocated = 8192, data = 0x7fffeb80c000}, builtin_location = 1, seen_line_directive = true, default_range_bits = 5, num_optimized_ranges = 486644, num_unoptimized_ranges = 4140} This code is unknown to me, so I am not sure where to look next ...