http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58893

            Bug ID: 58893
           Summary: [4.8, 4.9 Regression] <command-line>:0:0: internal
                    compiler error: Segmentation fault
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: octoploid at yandex dot com

Came across this strange segfault:

 ~ % c++ -include ./gcc_hidden.h -include xxx.h -w -march=native
-fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x
-I/usr/include/cairo -pthread -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
-I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/freetype2
-I/usr/include/freetype2 -DNDEBUG -DTRIMMED -O2 -fomit-frame-pointer
minimal.cpp

<command-line>:0:0: internal compiler error: Segmentation fault

gdb shows:
0x0000000000d36791 in linemap_macro_map_lookup(line_maps*, unsigned int) ()
(gdb) bt
#0  0x0000000000d36791 in linemap_macro_map_lookup(line_maps*, unsigned int) ()
#1  0x0000000000d374f5 in linemap_resolve_location(line_maps*, unsigned int,
location_resolution_kind, line_map const**) ()
#2  0x000000000074f5b6 in diagnostic_report_current_module(diagnostic_context*,
unsigned int) ()
#3  0x00000000004d6c50 in cp_diagnostic_starter(diagnostic_context*,
diagnostic_info*) ()
#4  0x0000000000dfc97b in diagnostic_report_diagnostic(diagnostic_context*,
diagnostic_info*) ()
#5  0x0000000000867319 in c_cpp_error(cpp_reader*, int, int, unsigned int,
unsigned int, char const*, __va_list_tag (*) [1]) ()
#6  0x0000000000753a0f in cpp_diagnostic(cpp_reader*, int, int, char const*,
__va_list_tag (*) [1]) ()
#7  0x0000000000753aa3 in cpp_error(cpp_reader*, int, char const*, ...) ()
#8  0x0000000000e01280 in _cpp_find_file ()
#9  0x0000000000e01d3e in _cpp_stack_include ()
#10 0x000000000087414f in push_command_line_include() ()
#11 0x0000000000d36306 in _cpp_lex_token ()
#12 0x0000000000d3a655 in cpp_get_token_with_location(cpp_reader*, unsigned
int*) ()
#13 0x00000000008734a1 in c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) ()
#14 0x0000000000d4ea93 in c_parse_file() ()
#15 0x0000000000d67477 in c_common_parse_file() ()
#16 0x0000000000da7003 in compile_file() ()
#17 0x0000000000da7aba in toplev_main(int, char**) ()
#18 0x00007ffff7772a6e in __libc_start_main () from /lib/libc.so.6
#19 0x0000000000d4117a in _start ()


 ~ % cat gcc_hidden.h
#pragma GCC visibility push(hidden)
 ~ % cat minimal.cpp
int main () {}
 ~ % 

And xxx.h doesn't exist.

4.7.3 is fine. 4.8 and 4.9 segfault.

Reply via email to