--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
Severity|major |normal
Status|UNCONFIRMED |WAITING
--- Comment #10 from rguenth at gcc dot gnu dot org 2008-05-07 19:29
---
Note that gcc 4.1 is known to have some wrong-code bugs regarding aliasing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36149
--- Comment #9 from dino at concisoft dot com 2008-05-07 06:15 ---
Understood. Just haven't been able to reproduce on a small piece of code :-(
It seems GNU C++ compiler doesn't give strict-aliasing warnings.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36149
--- Comment #8 from bangerth at dealii dot org 2008-05-07 04:17 ---
The point is: without the complete source code nothing definitive can
be said whether it's the compiler's or the programmer's fault. Your chances
that someone will take the time to try to understand what's going on
incre
--- Comment #7 from dino at concisoft dot com 2008-05-06 16:54 ---
-O2 -fno-strict-aliasing does work.
I think the LC and LLC functions always cast from a derived class to a base
class. That shouldn't cause aliasing problems, but I need to learn more about
that.
Thanks.
--
http://
--- Comment #6 from pinskia at gcc dot gnu dot org 2008-05-06 15:45 ---
As I mentioned it looks like you are violating aliasing rules. Basically you
are accessing one type as another. But without a full testcase I cann't be
sure. Also Does -O2 -fno-strict-aliasing work?
--
http:/
--- Comment #5 from dino at concisoft dot com 2008-05-06 15:42 ---
Are we missing a const, or would you care to give a bit more specific comment?
I see that:
template static const LINK* LCC(Y* X) {
return static_cast(X);
}
could be missing a const in the declaration of
--- Comment #4 from pinskia at gcc dot gnu dot org 2008-05-06 15:23 ---
This looks like you are violating C/C++ aliasing rules from that definition.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36149
--- Comment #3 from dino at concisoft dot com 2008-05-06 14:18 ---
template static LINK* LC(Y* X) {
return static_cast(X);
}
template static const LINK* LCC(Y* X) {
return static_cast(X);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36149
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-05-06 08:23 ---
How is LC defined?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36149
--- Comment #1 from dino at concisoft dot com 2008-05-06 07:19 ---
The same code works fine with -O1 and -O3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36149
11 matches
Mail list logo