From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80161 invoked by alias); 10 Apr 2015 18:51:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 80076 invoked by uid 48); 10 Apr 2015 18:51:06 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65734] Yet another case of lost alignment by stor_layout Date: Fri, 10 Apr 2015 18:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg00893.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65734 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org, | |jakub at redhat dot com, | |jason at redhat dot com --- Comment #1 from Jan Hubicka --- With the following check in stor-laout.c Index: stor-layout.c =================================================================== --- stor-layout.c (revision 221977) +++ stor-layout.c (working copy) @@ -1831,6 +1831,8 @@ finalize_type_size (tree type) { TYPE_SIZE (variant) = size; TYPE_SIZE_UNIT (variant) = size_unit; + if (TYPE_USER_ALIGN (variant)) + gcc_assert (user_align && TYPE_ALIGN (variant) == align); TYPE_ALIGN (variant) = align; TYPE_PRECISION (variant) = precision; TYPE_USER_ALIGN (variant) = user_align; I get: 0xa87ace finalize_type_size ../../gcc/stor-layout.c:1835 0xa87bbe finish_record_layout(record_layout_info_s*, int) ../../gcc/stor-layout.c:2079 0x6454bc layout_class_type ../../gcc/cp/class.c:6468 0x6454bc finish_struct_1(tree_node*) ../../gcc/cp/class.c:6598 0x631f4e instantiate_class_template_1 ../../gcc/cp/pt.c:9648 0x631f4e instantiate_class_template(tree_node*) ../../gcc/cp/pt.c:9688 0x68a20d complete_type(tree_node*) ../../gcc/cp/typeck.c:146 0x63216c instantiate_class_template_1 ../../gcc/cp/pt.c:9469 0x63216c instantiate_class_template(tree_node*) ../../gcc/cp/pt.c:9688 0x68a20d complete_type(tree_node*) ../../gcc/cp/typeck.c:146 0x5f6876 start_decl_1(tree_node*, bool) ../../gcc/cp/decl.c:4900 0x60567f start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/cp/decl.c:4863 0x67b646 cp_parser_init_declarator ../../gcc/cp/parser.c:17170 0x67cc1c cp_parser_simple_declaration ../../gcc/cp/parser.c:11607 0x666503 cp_parser_block_declaration ../../gcc/cp/parser.c:11481 0x6860b9 cp_parser_declaration ../../gcc/cp/parser.c:11378 0x6849aa cp_parser_declaration_seq_opt ../../gcc/cp/parser.c:11264 0x684cbf cp_parser_translation_unit ../../gcc/cp/parser.c:4100 0x684cbf c_parse_file() ../../gcc/cp/parser.c:33192 0x736ac2 c_common_parse_file() ../../gcc/c-family/c-opts.c:1057