[Bug c/64185] Optimized code gives unexpected results

2014-12-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64185 --- Comment #5 from Andrew Pinski --- (In reply to zaz from comment #4) > > > this: > > > struct PascalString > > > { > > > int length; > > > char data[0]; > > > }; > > > And then just allocate necessary memory block and able access to someth

[Bug c/64185] Optimized code gives unexpected results

2014-12-08 Thread zaz at ua7 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64185 --- Comment #4 from zaz at ua7 dot net --- > > this: > > struct PascalString > > { > > int length; > > char data[0]; > > }; > > And then just allocate necessary memory block and able access to something > > like: > > ps.data[100] - if allocate

[Bug c/64185] Optimized code gives unexpected results

2014-12-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64185 --- Comment #3 from Andrew Pinski --- (In reply to zaz from comment #2) > But this is deliberate out-of-bands. IE in this test application searchDict2 > lookup all KV fields in dict structure in loop based on kv1 offset: > kv1 + 0 - this is point

[Bug c/64185] Optimized code gives unexpected results

2014-12-08 Thread zaz at ua7 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64185 --- Comment #2 from zaz at ua7 dot net --- But this is deliberate out-of-bands. IE in this test application searchDict2 lookup all KV fields in dict structure in loop based on kv1 offset: kv1 + 0 - this is pointer to kv1 kv1 + 1 - this is pointer

[Bug c/64185] Optimized code gives unexpected results

2014-12-07 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64185 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|