Description: Compile fastlscomplex with GCC 6
Author: Rafael Laboissiere <rafael@debian.org>
Forwarded: no
Last-Update: 2016-08-24

--- octave-lssa-0.1.2.orig/src/fastlscomplex.cc
+++ octave-lssa-0.1.2/src/fastlscomplex.cc
@@ -372,8 +372,11 @@ bool flscomplex (const RowVector & tvec,
 
                             --tpra;
                             h = *tpra * *exp_ptr;
-                            record_current->power_series[p].real() -= h.imag();
-                            record_current->power_series[p].imag() += h.real();
+                            double tmp;
+                            tmp = record_current->power_series[p].real();
+                            record_current->power_series[p].real(tmp - h.imag());
+                            tmp = record_current->power_series[p].imag();
+                            record_current->power_series[p].imag(tmp + h.real());
 
                             if (++exp_ptr >= exp_pse_ptr )
                               break;
@@ -386,8 +389,10 @@ bool flscomplex (const RowVector & tvec,
 
                             --tpra;
                             h = -*tpra * *exp_ptr;
-                            record_current->power_series[p].real() -= h.imag();
-                            record_current->power_series[p].imag() += h.real();
+                            tmp = record_current->power_series[p].real();
+                            record_current->power_series[p].real(tmp - h.imag());
+                            tmp = record_current->power_series[p].imag();
+                            record_current->power_series[p].imag(tmp + h.real());
 
                             if (++exp_ptr >= exp_pse_ptr)
                               break;
@@ -422,8 +427,11 @@ bool flscomplex (const RowVector & tvec,
 
                                   tprb -= 2;
                                   h = *tprb * *exp_ptr;
-                                  record_current->power_series[p].real() -= h.imag();
-                                  record_current->power_series[p].imag() += h.real();
+                                  double tmp;
+                                  tmp = record_current->power_series[p].real();
+                                  record_current->power_series[p].real(tmp - h.imag());
+                                  tmp = record_current->power_series[p].imag();
+                                  record_current->power_series[p].imag(tmp + h.real());
 
                                   if ( ++exp_ptr >= exp_pse_ptr )
                                     break;
@@ -436,8 +444,10 @@ bool flscomplex (const RowVector & tvec,
 
                                   tprb -= 2;
                                   h = - *tprb * *exp_ptr;
-                                  record_current->power_series[p].real() -= h.imag();
-                                  record_current->power_series[p].imag() += h.real();
+                                  tmp = record_current->power_series[p].real();
+                                  record_current->power_series[p].real(tmp - h.imag());
+                                  tmp = record_current->power_series[p].imag();
+                                  record_current->power_series[p].imag(tmp + h.real());
 
                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;
@@ -467,8 +477,11 @@ bool flscomplex (const RowVector & tvec,
 
                                   --tpra;
                                   h = *tpra * *exp_ptr;
-                                  record_next->power_series[q].real() -= h.imag();
-                                  record_next->power_series[q].imag() += h.real();
+                                  double tmp;
+                                  tmp = record_current->power_series[q].real();
+                                  record_current->power_series[q].real(tmp - h.imag());
+                                  tmp = record_current->power_series[q].imag();
+                                  record_current->power_series[q].imag(tmp + h.real());
 
                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;
@@ -481,8 +494,10 @@ bool flscomplex (const RowVector & tvec,
 
                                   --tpra;
                                   h = -*tpra * *exp_ptr;
-                                  record_next->power_series[q].real() -= h.imag();
-                                  record_next->power_series[q].imag() += h.real();
+                                  tmp = record_current->power_series[q].real();
+                                  record_current->power_series[q].real(tmp - h.imag());
+                                  tmp = record_current->power_series[q].imag();
+                                  record_current->power_series[q].imag(tmp + h.real());
 
                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;
