Re: Wrong-code bug in execute_update_addresses_taken?

2011-02-06 Thread Richard Guenther
On Sat, Feb 5, 2011 at 4:55 PM, Ulrich Weigand uweig...@de.ibm.com 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

Re: Wrong-code bug in execute_update_addresses_taken?

2011-02-06 Thread Ulrich Weigand
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

Wrong-code bug in execute_update_addresses_taken?

2011-02-05 Thread Ulrich Weigand
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

Re: Wrong-code bug in execute_update_addresses_taken?

2011-02-05 Thread H.J. Lu
On Sat, Feb 5, 2011 at 7:55 AM, Ulrich Weigand uweig...@de.ibm.com 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