Bug 21423 - gcc 2.96 optimization bug
Summary: gcc 2.96 optimization bug
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 21424
TreeView+ depends on / blocked
 
Reported: 2000-11-28 14:16 UTC by Plummer, Martyn
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-30 18:58:45 UTC
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 14:17 UTC, 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 05:00:00 UTC

Description Plummer, Martyn 2000-11-28 14:16:14 UTC
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 14:17:13 UTC
Created attachment 5789 [details]
Example program to show bug

Comment 2 Jakub Jelinek 2000-11-28 16:39:07 UTC
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.