public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "skpgkp2 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/96192] New: tree-inline.c(copy_decl_for_dup_finish) should preserve decl alignment in copy
Date: Tue, 14 Jul 2020 05:22:54 +0000	[thread overview]
Message-ID: <bug-96192-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 96192
           Summary: tree-inline.c(copy_decl_for_dup_finish) should
                    preserve decl alignment in copy
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: skpgkp2 at gmail dot com
                CC: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: x86_64-*-* i?86-*-*

tree-inline.c function copy_decl_for_dup_finish should preserve local decl
alignment in copy.

This issue appears when local decl alignment get lowered by target hook, but
during the inline, copy may get different alignment than original decl.

This blocks PR95237.

Test case:

$ cat foo.c
int a;

long long 
b (void)
{
}

void
c (void)
{
  if (b())
    a = 1;
}

$gcc -m32 -mpreferred-stack-boundary=2 -Os -c foo.c
during GIMPLE pass: adjust_alignment
foo.c: In function ??c??:
foo.c:12:1: internal compiler error: in execute, at adjust-alignment.c:74
   12 | c (void)
      | ^
0x20bc351 execute
        /local/skpandey/gccwork/gccwork/pr95237_1/gcc/adjust-alignment.c:74
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

             reply	other threads:[~2020-07-14  5:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  5:22 skpgkp2 at gmail dot com [this message]
2020-07-14  7:04 ` [Bug middle-end/96192] " rguenth at gcc dot gnu.org
2020-07-14 12:49 ` hjl.tools at gmail dot com
2020-07-14 15:01 ` skpgkp2 at gmail dot com
2020-07-22  6:26 ` skpgkp2 at gmail dot com
2020-07-24 21:19 ` cvs-commit at gcc dot gnu.org
2020-07-24 21:20 ` hjl.tools at gmail dot com

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-96192-4@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).