[Bug c++/32281] A problem of gcc4.1.0(O3 optimize)

2007-06-11 Thread rguenth at gcc dot gnu dot org
--- Comment #4 from rguenth at gcc dot gnu dot org 2007-06-11 12:23 --- It is still violating aliasing rules. That only -O3 fails is because -O3 enables -finline-functions, so it should as well fail with lower optimization settings with -finline-functions. Also -fno-strict-aliasing wil

[Bug c++/32281] A problem of gcc4.1.0(O3 optimize)

2007-06-11 Thread stillzhang at tencent dot com
--- Comment #3 from stillzhang at tencent dot com 2007-06-11 07:11 --- I think if "&packet" should be changed, it should change before the function ¡°stmt->set_params¡±. And in fact it is changed after "stmt->set_params¡±, so I think it's a logical error. Best wishes, still -- still

[Bug c++/32281] A problem of gcc4.1.0(O3 optimize)

2007-06-10 Thread stillzhang at tencent dot com
--- Comment #2 from stillzhang at tencent dot com 2007-06-11 06:07 --- Thank you. But if i compiled it without -O3, it work fine. If I compiled it under gcc3.3 with -O3, it also work fine. The same program with different optimize has different, so i think it should not be like this.

[Bug c++/32281] A problem of gcc4.1.0(O3 optimize)

2007-06-10 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-06-11 03:41 --- So packet is char*, and you are accessing it as uchar*, so this code is violating C/C++ aliasing rules. *** This bug has been marked as a duplicate of 21920 *** -- pinskia at gcc dot gnu dot org changed: