Hi there. kf in the static instance of MODEL_BUILT_IN_MOS1 (initialized in d_mos1.cc, line 39) depends on the compiler. i think this is bad.
as it seems, g++-4.7 compiled code comes up with a zeroed-out kf (kf.has_good_value() returns true), although kf._v has been initialized to NOT_INPUT before. llvm compiled code does retain kf._v == NOT_INPUT (i.e. !kf.has_good_value()). adding traces to the respective constructors, this is what i get during startup (with g++). """ @#@MODEL_BUILT_IN_DIODE::MODEL_BUILT_IN_DIODE(p) kf.has_good_value()=0 intptr_t(&kf)%30011=8786 @#@MODEL_BUILT_IN_MOS_BASE::MODEL_BUILT_IN_MOS_BASE(p) kf.has_good_value()=0 intptr_t(&kf)%30011=8786 @#@MODEL_BUILT_IN_MOS123::MODEL_BUILT_IN_MOS123(p) kf.has_good_value()=0 intptr_t(&kf)%30011=8786 @#@MODEL_BUILT_IN_MOS1::MODEL_BUILT_IN_MOS1(p) kf.has_good_value()=1 intptr_t(&kf)%30011=8786 """ it is not something i had expected (p is a BASE_SUBCKT*, 30011 is a prime). eventually, the output of """ gnucap> model m nmos1 gnucap> list """ varies (watch out for "kf=", which is only there in the g++ case, because of kf.has_good_value()). i tried with these (which compilers do you use?). """ $ g++-4.4 --version g++-4.4 (Debian 4.4.7-2) 4.4.7 $ g++ --version g++ (Debian 4.7.2-5) 4.7.2 $ g++-4.8 --version g++-4.8 (Debian 4.8.2-14) 4.8.2 $ clang++ --version Debian clang version 3.0-6.2 (tags/RELEASE_30/final) (based on LLVM 3.0) Target: x86_64-pc-linux-gnu Thread model: posix """ it doesn't look like a gnucap bug, does it? cheers felix _______________________________________________ Gnucap-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnucap-devel
