title: Variables do not take their assigned value (that's at least, what gdb tells)
body: <p>I'm stepping through the following code snippet:</p>
  
  <pre><code>(71)   int nonzero = this-&gt;matrix-&gt;getNonzero();
  (72)   int rows = this-&gt;matrix-&gt;getRows();
  </code></pre>
  
  <p>You would expect that <code>nonzero</code> and <code>rows</code> take the return value of the respective function. But no - in gdb, they have the value 200 before line 71 and 72, and they both have the value 200 after it. Altough the two functions return values different from 200.</p>
  
  <p>On the other hand, the variables seem to take the right value. When printing them with cout, they have the expected value. Only gdb seems to give a wrong value.</p>
  
  <p>You can see this in the debugging session protocol:</p>
  
  <pre><code>0:  71      int nonzero = this-&gt;matrix-&gt;getNonzero();
  0:  (gdb) 0:  (gdb) print nonzero
  0:  $1 = 200
  0:  (gdb) print this-&gt;matrix-&gt;getNonzero()
  0:  $2 = 102437
  0:  (gdb) n
  0:  72      int rows = this-&gt;matrix-&gt;getRows();
  0:  (gdb) print nonzero
  0:  $3 = 200
  0:  (gdb) print this-&gt;matrix-&gt;getRows() 
  0:  $4 = 19044
  0:  (gdb) n
  0:  74      this-&gt;tmp.init("tmpCUDA", rows, 1, rows, true);
  0:  (gdb) print rows
  0:  $5 = 200
  </code></pre>
  
  <p>Seems that I'm either doing a really stupid mistake or ran into something really strange. I have to say that these lines worked well in previous versions and cause trouble after a major change in the structure of the program, but not that class.</p>
  
  <p>(And yes, I did <code>make clean</code> and reboot. Code is not optimized. The getter functions are all const and can not change the member variable.)</p>