public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/18548] [4.0 Regression] Miscompiles code generated by Gambit-C Scheme->C compiler
Date: Sat, 18 Dec 2004 00:03:00 -0000	[thread overview]
Message-ID: <20041218000256.18164.qmail@sourceware.org> (raw)
In-Reply-To: <20041118185317.18548.lucier@math.purdue.edu>


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-18 00:02 -------
Here is at least a testcase for the MAX_EXPR problem:
Compile with -O0, works, compiling with -O2  -fno-tree-lrs does not.

long fff[10];
long f(long a, long b)
{
  long crcc = b;
  long d = *((int*)(a+1));
  int i;

  a = d >= b? d:b;


  for(i=0;i<10;i++)
   fff[i] = a;
}

int main(void)
{
  int i;
  long a = 10;
  f((long)(&a)-1,0);
  for(i = 0;i<10;i++)
   if (fff[i]!=10)
    abort ();
}



 -fno-tree-lrs is needed so we don't split the live range of a which we need to do so we hit the bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-18 00:02:55
               date|                            |


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


  parent reply	other threads:[~2004-12-18  0:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-18 18:53 [Bug middle-end/18548] New: " lucier at math dot purdue dot edu
2004-11-18 19:05 ` [Bug middle-end/18548] " lucier at math dot purdue dot edu
2004-12-16 14:13 ` [Bug tree-optimization/18548] [4.0 Regression] " belyshev at lubercy dot com
2004-12-17 23:28 ` [Bug middle-end/18548] " belyshev at lubercy dot com
2004-12-17 23:50 ` pinskia at gcc dot gnu dot org
2004-12-18  0:03 ` pinskia at gcc dot gnu dot org [this message]
2004-12-18  0:33 ` giovannibajo at libero dot it
2004-12-18  0:38 ` pinskia at gcc dot gnu dot org
2004-12-18 13:54 ` steven at gcc dot gnu dot org
2004-12-18 14:03 ` steven at gcc dot gnu dot org
2004-12-18 14:38 ` cvs-commit at gcc dot gnu dot org
2004-12-18 14:50 ` roger at eyesopen dot com
2004-12-18 15:07 ` steven at gcc dot gnu dot org
2004-12-18 15:08 ` steven at gcc dot gnu dot org
2004-12-18 15:08 ` steven at gcc dot gnu dot org
2004-12-18 15:28 ` belyshev at lubercy dot com
2004-12-18 20:23 ` lucier at math dot purdue dot edu

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=20041218000256.18164.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).