https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63928
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Created attachment 34034 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34034&action=edit testcase Also reproducible with valgrind: trippels@gcc2-power8 c++11 % valgrind -q --track-origins=yes --trace-children=yes ~/gcc_test/usr/local/bin/g++ -std=gnu++11 -O2 -w condition_variable.ii ==80030== Invalid read of size 8 ==80030== at 0x103EB1BC: cxx_eval_store_expression (constexpr.c:2552) ==80030== by 0x103EB1BC: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:2943) ==80030== by 0x103EACAB: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:2955) ==80030== by 0x103EB297: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:3047) ==80030== by 0x103EB66B: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:3214) ==80030== by 0x103E9A3B: cxx_eval_call_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*) (constexpr.c:1328) ==80030== by 0x103EB623: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:2865) ==80030== by 0x103F0F7B: cxx_eval_outermost_constant_expr(tree_node*, bool, tree_node*) (constexpr.c:3340) ==80030== by 0x103F5603: maybe_constant_value(tree_node*, tree_node*) (constexpr.c:3453) ==80030== by 0x103506AB: finish_static_assert(tree_node*, tree_node*, unsigned int, bool) (semantics.c:7046) ==80030== by 0x102B02C7: cp_parser_static_assert(cp_parser*, bool) (parser.c:12139) ==80030== by 0x102D35EF: cp_parser_member_declaration(cp_parser*) (parser.c:20673) ==80030== by 0x102A290B: cp_parser_member_specification_opt (parser.c:20542) ==80030== by 0x102A290B: cp_parser_class_specifier_1 (parser.c:19734) ==80030== by 0x102A290B: cp_parser_class_specifier (parser.c:19970) ==80030== by 0x102A290B: cp_parser_type_specifier(cp_parser*, int, cp_decl_specifier_seq*, bool, int*, bool*) (parser.c:14630) ==80030== Address 0xb69b348 is 104 bytes inside a block of size 208 free'd ==80030== at 0x407764C: free (vg_replace_malloc.c:473) ==80030== by 0x1022934B: data_free (hash-table.h:233) ==80030== by 0x1022934B: hash_table<hash_map<tree_node*, tree_node*, default_hashmap_traits>::hash_entry, xcallocator, true>::expand() (hash-table.h:1346) ==80030== by 0x10229583: find_slot_with_hash (hash-table.h:1455) ==80030== by 0x10229583: hash_map<tree_node*, tree_node*, default_hashmap_traits>::put(tree_node* const&, tree_node* const&) (hash-map.h:207) ==80030== by 0x103EC5EF: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:2917) ==80030== by 0x103EB57F: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:2985) ==80030== by 0x103E93A3: cxx_bind_parameters_in_call (constexpr.c:1071) ==80030== by 0x103E93A3: cxx_eval_call_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*) (constexpr.c:1234) ==80030== by 0x103EB623: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:2865) ==80030== by 0x103ED93F: cxx_eval_binary_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*) (constexpr.c:1491) ==80030== by 0x103EB31F: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:3092) ==80030== by 0x103EB193: cxx_eval_store_expression (constexpr.c:2540) ==80030== by 0x103EB193: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:2943) ==80030== by 0x103EACAB: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:2955) ==80030== by 0x103EB297: cxx_eval_constant_expression(constexpr_ctx const*, tree_node*, bool, bool*, bool*, tree_node**) (constexpr.c:3047) ==80030==