Bug 63891 - fails to find obvious bugs
fails to find obvious bugs
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: egcs (Show other bugs)
7.1
alpha Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-20 12:46 EDT by d.binderman
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-04-20 12:46:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2002-04-20 12:46:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12 alpha)

Description of problem:
Given the following source code, 

void
f()
{
	int a[ 10];
	
	a[ -1] = -1;	/* bug here */
	a[ 0] = 0;
	a[ 9] = 9;
	a[ 10] = 10;	/* bug here */
}

then gcc for RH 7.1 fails to find the two bugs in this code.

I even tried -ansi -pedantic -Wall, but that didn't help either.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. compile example fragment code.
2.
3.
	

Actual Results:  total silence from the compiler.

Expected Results:  Where an array index is a constant, it might of value
to ensure that constant is in range for the array.

Additional info:
Comment 1 Jakub Jelinek 2002-04-22 05:49:10 EDT
Please file this as enhancement PR to GCC GNATS instead
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?database=gcc

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