public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94233] [OpenMP] ICE in lto1 for AMDGCN offloading: in dr_analyze_innermost, at tree-data-ref.c:925 for gcc-mainline/libgomp/testsuite/libgomp.c/target-link-1.c Date: Fri, 20 Mar 2020 16:09:16 +0000 [thread overview] Message-ID: <bug-94233-4-f9kpKFYsv0@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94233-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94233 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Last reconfirmed| |2020-03-20 --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Richard Biener from comment #1) > get_object_alignment_1 (base, &bit_base_alignment, &bit_base_misalignment); > gcc_assert (bit_base_alignment % BITS_PER_UNIT == 0 > && bit_base_misalignment % BITS_PER_UNIT == 0); > where base is the result of get_inner_reference. This possibly hints at > some odd alignment values on some decl(?). Indeed, bit_base_alignment is here == 1; the alignment is: ((unsigned)1) << ((NODE)->decl_common.align - 1 hence, …->decl_common.align == 1 The align:1 is produced by lto.c's offload_handle_link_vars(), which calls: tree link_ptr_var = make_node (VAR_DECL); which contains: enum tree_code_class type = TREE_CODE_CLASS (code); ... switch (type) ... case tcc_declaration: ... SET_DECL_ALIGN (t, 1); Untested patch: diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 39bb5f45c95..812dcc39b44 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -568,2 +568,3 @@ offload_handle_link_vars (void) SET_DECL_MODE (link_ptr_var, TYPE_MODE (type)); + SET_DECL_ALIGN (field, TYPE_ALIGN (ptr_type_node)); DECL_SIZE (link_ptr_var) = TYPE_SIZE (type);
next prev parent reply other threads:[~2020-03-20 16:09 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-20 10:17 [Bug middle-end/94233] New: " burnus at gcc dot gnu.org 2020-03-20 10:23 ` [Bug middle-end/94233] " rguenth at gcc dot gnu.org 2020-03-20 16:09 ` burnus at gcc dot gnu.org [this message] 2020-03-23 7:32 ` cvs-commit at gcc dot gnu.org 2020-03-23 7:38 ` burnus 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-94233-4-f9kpKFYsv0@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: linkBe 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).