Bug 21423 - gcc 2.96 optimization bug
gcc 2.96 optimization bug
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
Blocks: 21424
  Show dependency treegraph
Reported: 2000-11-28 09:16 EST by Plummer, Martyn
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-11-30 13:58:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Example program to show bug (1.42 KB, text/plain)
2000-11-28 09:17 EST, Plummer, Martyn
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2000:132 normal SHIPPED_LIVE Bug fixing update of GCC 2.96 2000-12-19 00:00:00 EST

  None (edit)
Description Plummer, Martyn 2000-11-28 09:16:14 EST
This could be the same bug as #20580, but I am not really qualified to say,
so I'm submitting a separate report.

This bug came to light in the R language (see http://www.r-project.org and
R-base on Red Hat Powertools), causing the random number generator for the
Poisson distribution to misbehave.  The bug manifests itself only when the
code is optimized.

I am attaching a small example program - abstracted from the R source code
- that reproduces the bug.

When compiled with gcc -lm, the output is

When compiled with gcc -lm -O2, the output is

If this works for you, a larger program is available that is much closer to
the original source.
Comment 1 Plummer, Martyn 2000-11-28 09:17:13 EST
Created attachment 5789 [details]
Example program to show bug
Comment 2 Jakub Jelinek 2000-11-28 11:39:07 EST
Actually, this is not related to #20580, but #21376 and seems to be fixed
by that patch as well. So if the patch gets accepted into CVS gcc, it will
be part of gcc-2.96-65 soon.

Note You need to log in before you can comment on or make changes to this bug.