Richard Guenther wrote:
> A bug? Can you file a bugreport and CC me? I'll look into the
> problem.
Sure, this is now PR tree-optimization/47621.
Thanks for looking into it!
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
ulrich.weig...@de.ibm.com
On Sat, Feb 5, 2011 at 4:55 PM, Ulrich Weigand wrote:
> Hello,
>
> the following program seems to be miscompiled at -O or higher:
>
> int
> main (void)
> {
> int data = 1;
>
> struct ptr
> {
> int val;
> } *ptr = (struct ptr *) &data;
>
> ptr->val = 0;
>
> return data;
> }
>
> This
On Sat, Feb 5, 2011 at 7:55 AM, Ulrich Weigand wrote:
> Hello,
>
> the following program seems to be miscompiled at -O or higher:
>
> int
> main (void)
> {
> int data = 1;
>
> struct ptr
> {
> int val;
> } *ptr = (struct ptr *) &data;
>
> ptr->val = 0;
>
> return data;
> }
>
> This
Hello,
the following program seems to be miscompiled at -O or higher:
int
main (void)
{
int data = 1;
struct ptr
{
int val;
} *ptr = (struct ptr *) &data;
ptr->val = 0;
return data;
}
This program should return 0, but actually returns 1.
[ As far as I can tell, this pro