optimization/8300: [3.2/3.3/3.4 regression] [sparc] ICE in gen_reg_rtx, at emit-rtl.c:662

Robert Schiele rschiele@uni-mannheim.de
Mon Mar 17 10:04:00 GMT 2003


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.
> 
> How's that?

It's pointer arithmetic:

Assume you have the following memory layout...

|   |
+---+
|   | <== ... 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) == 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.
> 
> 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

-- 
Robert Schiele			Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker	mailto:rschiele@uni-mannheim.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030317/74790f52/attachment.sig>


More information about the Gcc-bugs mailing list