http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59499
Bug ID: 59499
Summary: Probably optimization error
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: desoft at freemail dot gr
definefunc(L"int-",[](){stack.push(-(stack.pop())+(stack.pop()));});
The above function is defined in order to subtract the tos of the stack from
the lower number, but the result is wrong.
In order to have it work correctly I have to redefine it like:
{int i2=stack.pop();int i1=stack.pop();stack.push(i1-i2);}
I have changed parentheses and order keeping the same semantics but nothing
changed.
It is a reproducible bug under current circumstances.
I don“t send all the code because it is big, but I may create a complete
example f that is felt as needed.