This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/30511] False array bound check causes gcc failed to boostrap
- From: "mrs at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2007 22:02:49 -0000
- Subject: [Bug bootstrap/30511] False array bound check causes gcc failed to boostrap
- References: <bug-30511-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from mrs at apple dot com 2007-01-19 22:02 -------
Testcase from delta, compile with:
$ ./xgcc -B./ t.c -O2 -S -Wall
t.c: In function 'gfc_get_namespace':
t.c:10: warning: array subscript is above array bounds
typedef struct { int kind; } gfc_typespec;
typedef struct gfc_namespace { gfc_typespec default_type[26]; } gfc_namespace;
void gfc_get_namespace ()
{
gfc_namespace *ns=0;
gfc_typespec *ts =0;
int i;
for (i = 'a'; i <= 'z'; i++)
{
ts = &ns->default_type[i - 'a'];
ts->kind = 0;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30511