This happens in a large function, which has a relatively complicated algorithm.
Simply speaking, its structure is as such:
___________________________________________________________
some basic calculation
------------------------------
y = expression;
\-------------------------------
____________________________________________________________
some operations
--------------------------------
\--------------------------------
if \{
block 1;
\}
else\{
if \{ block 2; \}
else \{ block 3; \}
\}
The structure of blocks 2 and 3 will change the way in which y is calculated. The result is wrong. I check it through gdb. The five results above are obtained at the same environment except for the changes in the two blocks
In many executions, y is always equal to 0. Otherwise, it will be far larger than a right value.
But when either or each of the two blocks is removed, y will obtain a normal value.
Hum! What kind of var is y2? What is the expression assigned to it? There are really several things that can cause that so is a bit hard to help you without the full compilable code.
double, the expression is one such as +-/*
It is sure that the lf_lese_ structure is compiled before y2 is actually assigned.
The compilation will make effect on y2? but before y2 is assigned, 'p y2' can not give a value.
May you list the common possilbe causes of the faults? I consulted about it but many people do not know how to interprete it.
Thanks