public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gmorain at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/31830] Input parameter trashed with optimization -O when using a union and bit field
Date: Sat, 19 May 2007 01:17:00 -0000	[thread overview]
Message-ID: <20070519011742.26974.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31830-14504@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from gmorain at gmail dot com  2007-05-19 02:17 -------
(In reply to comment #2)
> I can reproduce the failure on powerpc-linux-gnu with 4.1.0 but it works on the
> trunk. combine is doing something wrong.
> 

I tested it on 4.2.0, and it works OK.  Except, I can't understand why the
stack frame is 32 bytes instead of 16.

powerpc-elf-objdump -S foo.o

foo.o:     file format elf32-powerpc

Disassembly of section .text:

00000000 <foo>:
   0:   94 21 ff e0     stwu    r1,-32(r1)
   4:   7c 08 02 a6     mflr    r0
   8:   93 a1 00 14     stw     r29,20(r1)
   c:   90 01 00 24     stw     r0,36(r1)
  10:   7c 7d 1b 78     mr      r29,r3
  14:   48 00 00 01     bl      14 <foo+0x14>
  18:   53 a3 c0 0e     rlwimi  r3,r29,24,0,7
  1c:   48 00 00 01     bl      1c <foo+0x1c>
  20:   80 01 00 24     lwz     r0,36(r1)
  24:   7c 08 03 a6     mtlr    r0
  28:   83 a1 00 14     lwz     r29,20(r1)
  2c:   38 21 00 20     addi    r1,r1,32
  30:   4e 80 00 20     blr


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31830


  parent reply	other threads:[~2007-05-19  1:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-04 23:38 [Bug target/31830] New: " gmorain at gmail dot com
2007-05-04 23:47 ` [Bug target/31830] " gmorain at gmail dot com
2007-05-04 23:49 ` [Bug rtl-optimization/31830] " pinskia at gcc dot gnu dot org
2007-05-19  1:17 ` gmorain at gmail dot com [this message]
     [not found] <bug-31830-4@http.gcc.gnu.org/bugzilla/>
2012-02-02  8:25 ` pinskia 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=20070519011742.26974.qmail@sourceware.org \
    --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).