public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-65734-4-TPLQ9vbAJY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65734-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65734

Jan Hubicka <hubicka at gcc dot gnu.org> 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 <hubicka at gcc dot gnu.org> ---
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


  reply	other threads:[~2015-04-10 18:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 18:49 [Bug c++/65734] New: " hubicka at gcc dot gnu.org
2015-04-10 18:51 ` hubicka at gcc dot gnu.org [this message]
2015-04-10 19:39 ` [Bug c++/65734] " jason at gcc dot gnu.org
2015-04-11  4:16 ` jason at gcc dot gnu.org
2015-04-28 14:44 ` jason at gcc dot gnu.org
2015-04-28 15:23 ` jason at gcc dot gnu.org
2015-08-17 15:45 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65734-4-TPLQ9vbAJY@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).