This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/7799: [3.2/3.3 regression] Loop bug with optimization flag -Os in gcc
- From: Joern Rennecke <amylaar at onetel dot net dot uk>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 20 Dec 2002 06:16:02 -0000
- Subject: Re: optimization/7799: [3.2/3.3 regression] Loop bug with optimization flag -Os in gcc
- Reply-to: Joern Rennecke <amylaar at onetel dot net dot uk>
The following reply was made to PR optimization/7799; it has been noted by GNATS.
From: Joern Rennecke <amylaar@onetel.net.uk>
To: segher@koffie.nl (Segher Boessenkool)
Cc: ehrhardt@mathematik.uni-ulm.de (Christian Ehrhardt),
nejataydin@superonline.com, gcc-gnats@gcc.gnu.org, gcc@gcc.gnu.org,
gcc-bugs@gcc.gnu.org
Subject: Re: optimization/7799: [3.2/3.3 regression] Loop bug with optimization flag -Os in gcc
Date: Fri, 20 Dec 2002 06:17:18 +0000 (GMT)
> 6.2.5.19:
> ... An array type describes a contiguously allocated nonempty set of
> objects with a particular member object type, called the element
> type. ...
>
> So an array can not wrap around address 0.
It can't wrap around there, but if pointers are signed, it might straddle 0
nonetheless. This requires, of course, for an aligned start address
that the address 0 is not the same as NULL, which AFAICR is something gcc
doesn't currently support.
OTOH, if the start address is not aligned to a multiple of the types size,
you can have the array straddle address 0 without it ever being a valid
address. Well, that is if character pointers have a different
representation ;-)