diff options
author | alanminko <37236958+alanminko@users.noreply.github.com> | 2021-08-19 09:51:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-19 09:51:25 -0700 |
commit | 3b4a4481a13444f7e427d6b04b5083921ea15a95 (patch) | |
tree | 6b0214cf41def9d6ff8e9e488c15b1e3c6894d74 /src/aig | |
parent | 0fc13478b80d2fe94fb105375b080ba0a53f6745 (diff) | |
parent | c312e416017f4abf856a184279f5ce3a7198601a (diff) | |
download | abc-3b4a4481a13444f7e427d6b04b5083921ea15a95.tar.gz abc-3b4a4481a13444f7e427d6b04b5083921ea15a95.tar.bz2 abc-3b4a4481a13444f7e427d6b04b5083921ea15a95.zip |
Merge pull request #132 from jamesjer/aliasing
Fix violation of C strict aliasing rules.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/giaUtil.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c index 371cda62..efc866b8 100644 --- a/src/aig/gia/giaUtil.c +++ b/src/aig/gia/giaUtil.c @@ -2109,11 +2109,13 @@ void Gia_AigerWriteLut( Gia_Man_t * p, char * pFileName ) Gia_ManForEachObj( p, pObj, i ) if ( i && Gia_ObjIsLut(p, i) ) { + word truth; pLuts[iLut].Type = 3; Gia_LutForEachFanin( p, i, iFan, k ) pLuts[iLut].pFans[k] = Gia_ManObj(p, iFan)->Value; pLuts[iLut].nFans = k; - *(word *)pLuts[iLut].pTruth = Gia_LutComputeTruth6(p, i, vTruths); + truth = Gia_LutComputeTruth6(p, i, vTruths); + memcpy( pLuts[iLut].pTruth, &truth, sizeof(word) ); pObj->Value = pLuts[iLut].Out = Abc_Var2Lit( iLut, 0 ); iLut++; } |