The body of the constructor for G4QContent that takes 6 ints contains code with no effect, and which an optimizer is almost sure to eliminate: 56 // Initialize by the full quark content 57 G4QContent::G4QContent(G4int d, G4int u, G4int s, G4int ad, G4int au, G4int as): 58 nD(d),nU(u),nS(s),nAD(ad),nAU(au),nAS(as) 59 { 60 if(d<0||u<0||s<0||ad<0||au<0||as<0) 61 { 62 #ifdef erdebug 63 G4cerr<<"***G4QContent:"<<d<<","<<u<<","<<s<<","<<ad<<","<<au<<","<<as<<G4endl; 64 #endif 65 if(d<0) ad-=d; 66 if(u<0) au-=u; 67 if(s<0) as-=s; 68 if(ad<0) d-=ad; 69 if(au<0) u-=au; 70 if(as<0) s-=as; 71 } 72 } The variables ad, au, as, e, u, and s that are modified in the conditional logic are all local (not the member data of the object being constructed), and thus the optimizer will do away with the entire conditional code. It seems unlikely that this was the intention of the author.
Hi Marc, Thanks. I'll take a look. Dennis
Your fix has been made and will be included in the 9.4 release. Dennis