Bug 21423 - gcc 2.96 optimization bug
gcc 2.96 optimization bug
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
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:
Environment:
Last Closed: 2000-11-30 13:58:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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

  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
9
10

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

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.