[Bug c++/20269] Optimizer problem with aliasing floating point variable

2005-06-05 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-05 09:08 --- Mark as a dup of bug 21920. *** This bug has been marked as a duplicate of 21920 *** -- What|Removed |Added -

[Bug c++/20269] Optimizer problem with aliasing floating point variable

2005-06-05 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-05 09:08 --- Reopening to ... -- What|Removed |Added Status|RESOLVED|UNCO

[Bug c++/20269] Optimizer problem with aliasing floating point variable

2005-03-02 Thread bangerth at dealii dot org
--- Additional Comments From bangerth at dealii dot org 2005-03-02 19:24 --- The problem with the compiler not warning about these cases is that it is perfectly legal to cast a double* to an int* -- the problem is that it is not legal to access a double through an int*, but to flag thi

[Bug c++/20269] Optimizer problem with aliasing floating point variable

2005-03-02 Thread bobm75 at gmail dot com
--- Additional Comments From bobm75 at gmail dot com 2005-03-02 18:03 --- Ok, thank you for your explanation. We have a huge codebase and we just increased the optimization level from -O to -O2 (together with -march=pentium3), that's when this came up. Since most of this code has been a

[Bug c++/20269] Optimizer problem with aliasing floating point variable

2005-03-02 Thread giovannibajo at libero dot it
--- Additional Comments From giovannibajo at libero dot it 2005-03-02 11:36 --- -Wstrict-aliasing can catch some, but you should not rely on it, because it can't possibly catch all of them. You should read and understand how aliasing works in ISO C and keep it in mind while writing the

[Bug c++/20269] Optimizer problem with aliasing floating point variable

2005-03-01 Thread bobm75 at gmail dot com
--- Additional Comments From bobm75 at gmail dot com 2005-03-02 00:33 --- I read the documentation on -fstrict-aliasing and it makes sense to me why this code breaks those rules. I just wonder why the compiler didn't warn about it, since this seems to be a pretty straight forward case o

[Bug c++/20269] Optimizer problem with aliasing floating point variable

2005-03-01 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-02 00:21 --- This is called a violation of aliasing rules by the way. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20269

[Bug c++/20269] Optimizer problem with aliasing floating point variable

2005-03-01 Thread bangerth at dealii dot org
--- Additional Comments From bangerth at dealii dot org 2005-03-02 00:04 --- You can't access a floating point variable through a pointer to integer. Read up on -fstrict-aliasing, or its negative -fno-strict-aliasing. W. -- What|Removed |Added --