This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/8300: [3.2/3.3/3.4 regression] [sparc] ICE in gen_reg_rtx, at emit-rtl.c:662
- From: Robert Schiele <rschiele at uni-mannheim dot de>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 17 Mar 2003 09:26:00 -0000
- Subject: Re: optimization/8300: [3.2/3.3/3.4 regression] [sparc] ICE in gen_reg_rtx, at emit-rtl.c:662
- Reply-to: Robert Schiele <rschiele at uni-mannheim dot de>
The following reply was made to PR optimization/8300; it has been noted by GNATS.
From: Robert Schiele <rschiele at uni-mannheim dot de>
To: Richard Henderson <rth at redhat dot com>, rth at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org,
gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org,
tneumann at pi3 dot informatik dot uni-mannheim dot de, gcc-gnats at gcc dot gnu dot org
Cc:
Subject: Re: optimization/8300: [3.2/3.3/3.4 regression] [sparc] ICE in gen_reg_rtx, at emit-rtl.c:662
Date: Mon, 17 Mar 2003 10:25:04 +0100
--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Mar 17, 2003 at 01:05:55AM -0800, Richard Henderson wrote:
> On Mon, Mar 17, 2003 at 06:08:21AM +0100, Robert Schiele wrote:
> > *(&c + 1) is also well defined.
>=20
> How's that?
It's pointer arithmetic:
Assume you have the following memory layout...
| |
+---+
| | <=3D=3D ... then the contents of that address is *(&c + 1)
+---+
| c |
+---+
| |
It is:
c: The contents of the variable c on the stack.
&c: The address where c is located on the stack.
&c + 1: That address plus 4 byte. (sizeof(int) =3D=3D 4 on sparc)
*(&c + 1): The contents of the above address.
> > 1. My rewritten example is legal code with no doubt and produces an
> > ICE whit optimization.
>=20
> Nyet.
Well, I still don't see why this is illegal. Can you give me the
paragraph of the C standard that prohibits this sort of pointer
arithmetic?
Robert
--=20
Robert Schiele Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker mailto:rschiele at uni-mannheim dot de
--AqsLC8rIMeq19msA
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iQEVAwUBPnWUcMQAnns5HcHpAQGdKggAlK9ZV4OgrAY+7UCvuoO7BbUg6PgbHhXQ
02LxCX3fN5FXsyvj5nVfD8ZbwK42rh6w95hb0XloKZwQMM7+izJala5SEOgghyUN
l3Wlr7f30yJOudPHFanqBtyfOuQJP9gWBfFIssIDtdAOx+ZpBxb8XGbpex5EAPWG
T5/DBchE6zrM46R7XCBdRurZ2PFTh6E9k7dJwfjOh+h5O0R6Npvv3NLHuvdfHfJk
vCfyZgRM8K96KmOzmetAytCsU01aD/6UsGOPhntnlqpOfysC87aPAJ9Zam6wCmMr
pq8hzQa7hdaVVUjnZbltLMQ/XY1/mHft6S1C95eekY5EPtFVEzCO1w==
=0Vp8
-----END PGP SIGNATURE-----
--AqsLC8rIMeq19msA--