public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4258: gcc-2.95.2 produces wrong code
@ 2001-09-10 9:26 Zack Weinberg
0 siblings, 0 replies; 5+ messages in thread
From: Zack Weinberg @ 2001-09-10 9:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/4258; it has been noted by GNATS.
From: Zack Weinberg <zack@codesourcery.com>
To: Ingo Rohloff <rohloff@in.tum.de>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/4258: gcc-2.95.2 produces wrong code
Date: Mon, 10 Sep 2001 09:23:18 -0700
On Mon, Sep 10, 2001 at 11:54:38AM +0200, Ingo Rohloff wrote:
> > However, additional tests can never hurt. If you
> > rewrite your program in a form that can go into the test suite, we'll
> > add it. (In a nutshell: the program must produce no output, and
> > should return 0 from main if it executed correctly, call abort if it
> > didn't.)
>
> Ok, i changed it that way. (The code itself is also simpler now.)
Thanks. That file is now c-torture/execute/20010910-1.c. Since you
reported this as a bug in 2.95, I put it onto all three active
branches (2.95, 3.0, mainline).
zw
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c/4258: gcc-2.95.2 produces wrong code
@ 2001-12-01 20:16 rodrigc
0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-01 20:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/4258; it has been noted by GNATS.
From: rodrigc@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
nobody@gcc.gnu.org, rohloff@in.tum.de
Cc:
Subject: Re: c/4258: gcc-2.95.2 produces wrong code
Date: 2 Dec 2001 04:05:32 -0000
Synopsis: gcc-2.95.2 produces wrong code
State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sat Dec 1 20:05:31 2001
State-Changed-Why:
Fixed in gcc 2.95.3 and added to testsuite as
c-torture/execute/20010910-1.c
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4258&database=gcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c/4258: gcc-2.95.2 produces wrong code
@ 2001-12-01 20:05 rodrigc
0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-01 20:05 UTC (permalink / raw)
To: gcc-bugs, gcc-gnats, gcc-prs, nobody, rohloff
Synopsis: gcc-2.95.2 produces wrong code
State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sat Dec 1 20:05:31 2001
State-Changed-Why:
Fixed in gcc 2.95.3 and added to testsuite as
c-torture/execute/20010910-1.c
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4258&database=gcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: c/4258: gcc-2.95.2 produces wrong code
@ 2001-09-07 9:36 Zack Weinberg
0 siblings, 0 replies; 5+ messages in thread
From: Zack Weinberg @ 2001-09-07 9:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/4258; it has been noted by GNATS.
From: Zack Weinberg <zack@codesourcery.com>
To: rohloff@in.tum.de
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/4258: gcc-2.95.2 produces wrong code
Date: Fri, 7 Sep 2001 09:27:47 -0700
On Fri, Sep 07, 2001 at 03:42:53PM -0000, rohloff@in.tum.de wrote:
> Compiling the attached code with -O2 produces a
> binary which skips a loop iteration.
I have compiled this code with -O1 and -O2 with
"gcc-2.95.4 20010902 (Debian prerelease)" and get identical output.
It seems, therefore, that the bug has been fixed in 2.95.3 or
2.95.4-to-be.
I cannot be certain, however, because you do not say what the program
should output. This is what I get:
BFFFFA18
BFFFFA1C
BFFFFA20
BFFFFA24
BFFFFA28
I don't know if that is correct or not.
zw
^ permalink raw reply [flat|nested] 5+ messages in thread
* c/4258: gcc-2.95.2 produces wrong code
@ 2001-09-07 8:46 rohloff
0 siblings, 0 replies; 5+ messages in thread
From: rohloff @ 2001-09-07 8:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 4258
>Category: c
>Synopsis: gcc-2.95.2 produces wrong code
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Sep 07 08:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Ingo Rohloff
>Release: gcc-2.95.2
>Organization:
>Environment:
Linux 2.4.9 i686
>Description:
Compiling the attached code with -O2 produces a
binary which skips a loop iteration.
>How-To-Repeat:
Compile the following code with -O2 and execute
the resulting binary.
------------------------------------------------
struct epic_rx_desc {
unsigned int next;
};
struct epic_private {
struct epic_rx_desc *rx_ring;
unsigned int rx_ring_dma;
unsigned char* rx_skbuff[32];
};
static void epic_init_ring(struct epic_private *ep)
{
int i;
for (i = 0; i < 32; i++) {
ep->rx_ring[i].next = ep->rx_ring_dma +
(i+1)*sizeof(struct epic_rx_desc);
ep->rx_skbuff[i] = 0;
}
ep->rx_ring[i-1].next = ep->rx_ring_dma;
}
int main()
{
struct epic_private ep;
struct epic_rx_desc rx_ring[32];
int i;
for (i=0;i<32;i++)
rx_ring[i].next=0;
ep.rx_ring=rx_ring;
ep.rx_ring_dma=(unsigned int)rx_ring;
epic_init_ring(&ep);
for (i=0;i<5;i++)
{
printf("%8X\n",ep.rx_ring[i].next);
}
}
>Fix:
Compile with -O1.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-12-02 4:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-10 9:26 c/4258: gcc-2.95.2 produces wrong code Zack Weinberg
-- strict thread matches above, loose matches on Subject: below --
2001-12-01 20:16 rodrigc
2001-12-01 20:05 rodrigc
2001-09-07 9:36 Zack Weinberg
2001-09-07 8:46 rohloff
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).