From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Iseli To: egcs@cygnus.com Subject: Small problem in cse Date: Fri, 17 Oct 1997 13:44:00 -0000 Message-id: <199710172043.WAA24596@Rivendell.MiddleEarth.net> X-SW-Source: 1997-10/msg00720.html Hi, I've received a segfault from cc1 due to a NULL dereference in cse.c. The following trivial patch cures the problem. Christian Fri Oct 17 12:29:48 1997 Christian Iseli * cse.c (insert): check that classp->first_same_value is not NULL before dereferencing. *** cse.c.orig Wed Oct 1 07:46:27 1997 --- cse.c Fri Oct 17 22:30:11 1997 *************** insert (x, classp, hash, mode) *** 1323,1329 **** table[hash] = elt; /* Put it into the proper value-class. */ ! if (classp) { classp = classp->first_same_value; if (CHEAPER (elt, classp)) --- 1323,1329 ---- table[hash] = elt; /* Put it into the proper value-class. */ ! if (classp && classp->first_same_value) { classp = classp->first_same_value; if (CHEAPER (elt, classp))