[Bug c++/25768] [3.4 regression] wrong code with inlining at -O2

2006-01-12 Thread pinskia at gcc dot gnu dot org
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-01-13 03:34 --- You are violating C++ aliasing rules, you have: int new_ybar_inline p = reinterpret_cast( free_list ); free_list = free_list->next; .. return p; *newchild = new_ybar_inline(); (*newchild)

[Bug c++/25768] [3.4 regression] wrong code with inlining at -O2

2006-01-12 Thread sschunck at pdf dot de
--- Comment #4 from sschunck at pdf dot de 2006-01-12 19:55 --- additional info: if instruction movl$1, (%edx) would be located two lines later the generated code would be correct (AFAIK) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25768

[Bug c++/25768] [3.4 regression] wrong code with inlining at -O2

2006-01-12 Thread sschunck at pdf dot de
--- Comment #3 from sschunck at pdf dot de 2006-01-12 17:04 --- The miscompiled line is (*newchild)->kind = interior; ( interior = 1 ) but when movl$1, (%edx) is done edx points to free_list; from function MemPool::new_element() instead of newchild -- http://gcc.g

[Bug c++/25768] [3.4 regression] wrong code with inlining at -O2

2006-01-12 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-12 16:49 --- >From looking at the source, it looks like you are violating aliasing rules but I cannot pinpoint where you are violating them. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25768

[Bug c++/25768] [3.4 regression] wrong code with inlining at -O2

2006-01-12 Thread sschunck at pdf dot de
--- Comment #1 from sschunck at pdf dot de 2006-01-12 16:45 --- Created an attachment (id=10630) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10630&action=view) c++ code the following assembler snipplet shows that the movl$1, (%edx) is scheduled too early .globl _ZN1A3foo