This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC] Adjust the middle-end memory model


Richard Guenther wrote:

> int i;
> float f;
> void foo()
> {
>   int *p = (int *)malloc(sizeof(int));
>   *p = 1;
>   i = *p;
>   float *q = (float *)p;
>   *q = 2.0;
>   f = *q;
> }

Yes, I think that's a valid program too.  I'm OK with giving up this
optimization; clearly we need to be correct first and foremost.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]