Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Work-around gcc optimization bug.
For unknown reasons having a call to TF1::Update (which is inside the inline function
TF1::SetParameters) leads gcc to add a non-existant jump back in the middle of the
routine resulting in a defacto infinite loop.  [i.e commenting out the call to Update
remove the 'bad code injection']

The solution is to unroll/explicitly inline TF1::SetParameters and remove the call
to Update (and also spread it to avoid duplicate conditional statement).
  • Loading branch information
pcanal committed Jun 18, 2019
commit 7f3ac5f3bcd9a63c8a0750b868c29cf4ebd8938f
8 changes: 6 additions & 2 deletions hist/hist/src/TF1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,18 @@ struct TF1v5Convert : public TF1 {
fnew.SetRange(from.fXmin, from.fXmax);
}
fnew.Copy(*this);
// need to set parameter values
if (from.GetParameters())
fFormula->SetParameters(from.GetParameters());
} else {
// case of a function pointers
fParams = new TF1Parameters(fNpar);
fName = from.GetName();
fTitle = from.GetTitle();
// need to set parameter values
if (from.GetParameters())
fParams->SetParameters(from.GetParameters());
}
// need to set parameter values
SetParameters(from.GetParameters());
// copy the other data members
fNpx = from.fNpx;
fType = (EFType)from.fType;
Expand Down