summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
authorJerry James <loganjerry@gmail.com>2021-08-09 16:24:04 -0600
committerJerry James <loganjerry@gmail.com>2021-08-09 16:24:04 -0600
commitc312e416017f4abf856a184279f5ce3a7198601a (patch)
tree4db01572a5a25970a3b552d4a2bf1113fb4a2e1c /src/aig
parent99ab99bfa6d1c2cc11d59af16aa26b273f611674 (diff)
downloadabc-c312e416017f4abf856a184279f5ce3a7198601a.tar.gz
abc-c312e416017f4abf856a184279f5ce3a7198601a.tar.bz2
abc-c312e416017f4abf856a184279f5ce3a7198601a.zip
Fix violation of C strict aliasing rules.
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/gia/giaUtil.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c
index f04c0bc3..d5a39f79 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++;
}