Problem 182

Summary: can't use g++-2.95.2 with -O option
Product: Geant4 Reporter: masaharu.aoki
Component: processes/electromagneticAssignee: Michel.Maire
Status: RESOLVED FIXED    
Severity: major    
Priority: P1    
Version: 2.0   
Hardware: PC   
OS: Linux   

Description masaharu.aoki 2000-12-21 22:29:20 CET
If Geant4.2.0 was built with g++-2.95.2 with -O option, it always crash at
around 1000000 events in G4MuPairProduction::SelectRandomAtom() because of a
variable 'rval' contains -NaN.  This is because of a table 'PartialSumsigma' is
initialized with -NaN in G4MuPairProduction::ComputeDDMicroscopicCrossSection
().  It looks like, in this member function,  the evaluation of a statement
G4double a6 = 1. - a5; foced delayed forever with -O option.

It could be not a bug in Geant but a bug in g++-2.95.2.  However, I would
really appreciate if Geant code is modified so that it keeps away from the
sympton.

Regards,
Msaharu Aoki
Comment 1 Gabriele Cosmo 2001-01-08 08:50:59 CET
*** Bug 183 has been marked as a duplicate of this bug. ***
*** 'Michel.Maire@cern.ch' will be responsible for bug 183. ***
Comment 2 Gabriele Cosmo 2001-01-26 09:06:59 CET
A bug in G4MuBremsstrahlung::PostStepDoIt() as been fixed in the development
tag "muon-V03-00-01" of processes/electromagnetic/muons. The fix cures this
problem observed also during the certification of g++-2.95.2 compiler.
Certification is proceeding.