public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4607: Optimization bug, (miscompilation of boehm-gc)
@ 2001-10-22 15:31 bryce
  0 siblings, 0 replies; 2+ messages in thread
From: bryce @ 2001-10-22 15:31 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, martin.kahlert, nobody

Synopsis: Optimization bug, (miscompilation of boehm-gc)

State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Mon Oct 22 15:31:21 2001
State-Changed-Why:
    This was fixed by:
    
    2001-10-19  Jakub Jelinek  <jakub@redhat.com>
    
            * simplify-rtx.c (simplify_plus_minus): Negate constant iff its neg
            field is different to previous argument's neg field.
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4607&database=gcc


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c/4607: Optimization bug, (miscompilation of boehm-gc)
@ 2001-10-18  2:06 Martin Kahlert
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Kahlert @ 2001-10-18  2:06 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4607
>Category:       c
>Synopsis:       Optimization bug, (miscompilation of boehm-gc)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 18 02:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Martin Kahlert
>Release:        3.1 20011017 (experimental)
>Organization:
Infineon AG
>Environment:
System: Linux keksy 2.4.12 #1 SMP Thu Oct 11 16:34:10 MEST 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.1/configure --prefix=/sw/gcc-3.1 --enable-languages=c++,f77,java --enable-threads=posix
>Description:
gcc miscompiles its sources (boehm-gc/mark_rts.c)
see http://gcc.gnu.org/ml/gcc/2001-10/msg01009.html for the original posting.
>How-To-Repeat:
$ cat t.c
#include <stdio.h>

struct exclusion
{
 int a1;
 int array[5];
} Table;

int *f(int start)
{
 return Table.array + start;
}

int main(int argc, char *argv[])
{
 int *next;

 if ( argc == 2 )
     next = f(atoi(argv[1]));
 else
     next = f(0);

 printf("next = %p, Table.array = %p, diff = %d\n",
         next, Table.array, next-Table.array);

 return 0;
}

$ gcc -O -o t t.c
$ t
next = 0x8049710, Table.array = 0x8049710, diff = 2

>Fix:
	do not use -O (but libjava is built using -O -g)
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-22 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-22 15:31 c/4607: Optimization bug, (miscompilation of boehm-gc) bryce
  -- strict thread matches above, loose matches on Subject: below --
2001-10-18  2:06 Martin Kahlert

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