public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/29154] [4.0/4.1/4.2 Regression] *(* ppointer++)++ = *pointer++ generates bad code
Date: Thu, 21 Sep 2006 09:12:00 -0000	[thread overview]
Message-ID: <20060921091202.21024.qmail@sourceware.org> (raw)
In-Reply-To: <bug-29154-13237@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from rguenth at gcc dot gnu dot org  2006-09-21 09:12 -------
Confirmed.  Gimplification get's this wrong.  Testcase:

extern void abort (void);
void foo(int **p, int *q)
{
  *(*p++)++ = *q++;
}
int main()
{
  int i = 42, j = 0;
  int *p = &i;
  foo(&p, &j);
  if (p - 1 != &i
      || j != 0
      || i != 0)
    abort ();
  return 0;
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org, rakdver at gcc dot gnu
                   |                            |dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
      Known to fail|                            |4.0.3 4.1.1 4.2.0
      Known to work|                            |3.4.6
   Last reconfirmed|0000-00-00 00:00:00         |2006-09-21 09:12:02
               date|                            |
            Summary|*(* ppointer++)++ =         |[4.0/4.1/4.2 Regression] *(*
                   |*pointer++ generates bad    |ppointer++)++ = *pointer++
                   |code                        |generates bad code


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


  parent reply	other threads:[~2006-09-21  9:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-20 18:01 [Bug c/29154] New: " ansak at bigfoot dot com
2006-09-20 18:47 ` [Bug c/29154] " pinskia at gcc dot gnu dot org
2006-09-21  9:12 ` rguenth at gcc dot gnu dot org [this message]
2006-09-22  7:30 ` [Bug c/29154] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-09-22 20:25 ` jakub at gcc dot gnu dot org
2006-09-23 10:33 ` rguenth at gcc dot gnu dot org
2006-10-01 22:57 ` mmitchel at gcc dot gnu dot org
2006-10-02  6:12 ` jakub at gcc dot gnu dot org
2006-10-02  6:24 ` jakub at gcc dot gnu dot org
2006-10-02  6:28 ` [Bug c/29154] [4.0 " jakub at gcc dot gnu dot org
2007-02-03 20:18 ` gdr at gcc dot gnu dot 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=20060921091202.21024.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).