https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78897
Bug ID: 78897 Summary: ICE: in output_constructor_regular_field, at varasm.c:5019 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org Target Milestone: --- markus@x4 /tmp % cat const.ii struct Optional { constexpr Optional() : _dummy{} { _value = 1; } union { int _dummy; int _value; }; }; Optional opt{}; markus@x4 /tmp % clang++ -std=c++14 -c const.ii markus@x4 /tmp % icpc -std=c++14 -c const.ii markus@x4 /tmp % g++ -c const.ii const.ii:8:15: internal compiler error: in output_constructor_regular_field, at varasm.c:5019 Optional opt{}; ^ 0x104e345 output_constructor_regular_field /home/markus/gcc/gcc/varasm.c:5019 0x104e345 output_constructor /home/markus/gcc/gcc/varasm.c:5327 0x104d2aa output_constant /home/markus/gcc/gcc/varasm.c:4704 0x104d2aa output_constructor_regular_field /home/markus/gcc/gcc/varasm.c:5057 0x104d2aa output_constructor /home/markus/gcc/gcc/varasm.c:5327 0x104f4d1 output_constant /home/markus/gcc/gcc/varasm.c:4704 0x104f4d1 assemble_variable_contents /home/markus/gcc/gcc/varasm.c:2083 0x10561ef assemble_variable(tree_node*, int, int, int) /home/markus/gcc/gcc/varasm.c:2259 0x105ba21 varpool_node::assemble_decl() /home/markus/gcc/gcc/varpool.c:588 0x96311c output_in_order /home/markus/gcc/gcc/cgraphunit.c:2248 0x963523 symbol_table::compile() /home/markus/gcc/gcc/cgraphunit.c:2488 0x965ed6 symbol_table::compile() /home/markus/gcc/gcc/cgraphunit.c:2587 0x965ed6 symbol_table::finalize_compilation_unit() /home/markus/gcc/gcc/cgraphunit.c:2584