https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67935
Bug ID: 67935 Summary: internal compiler error: Segmentation fault Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: niqingliang2003 at gmail dot com Target Milestone: --- Created attachment 36484 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36484&action=edit compiled with command: g++ -std=c++11 main.cpp main.cpp is the smallest code for generating the compiling error. compile command: g++ -std=c++11 main.cpp platform: archlinux gcc version: 5.2 error info: internal compiler error: Segmentation fault void serialize(_T & o) workaround 1: change 'typedef struct { ... } base_t' to 'typedef struct xxx {...} base_t' workaround 2: move the '#include <array>' in the first line. when change the 'array' to 'vector' (both header and declaration of 'p' in base_t), result become: internal compiler error: Segmentation fault typedef struct { ^