public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* undefined behavior in value_range::equiv_add()?
@ 2019-05-29 12:28 Aldy Hernandez
  2019-05-29 13:29 ` Richard Biener
  0 siblings, 1 reply; 19+ messages in thread
From: Aldy Hernandez @ 2019-05-29 12:28 UTC (permalink / raw)
  To: Richard Biener, gcc-patches

As per the API, and the original documentation to value_range, 
VR_UNDEFINED and VR_VARYING should never have equivalences.  However, 
equiv_add is tacking on equivalences blindly, and there are various 
regressions that happen if I fix this oversight.

void
value_range::equiv_add (const_tree var,
			const value_range *var_vr,
			bitmap_obstack *obstack)
{
   if (!m_equiv)
     m_equiv = BITMAP_ALLOC (obstack);
   unsigned ver = SSA_NAME_VERSION (var);
   bitmap_set_bit (m_equiv, ver);
   if (var_vr && var_vr->m_equiv)
     bitmap_ior_into (m_equiv, var_vr->m_equiv);
}

Is this a bug in the documentation / API, or is equiv_add incorrect and 
we should fix the fall-out elsewhere?

Thanks.
Aldy

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-06-07 19:26 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 12:28 undefined behavior in value_range::equiv_add()? Aldy Hernandez
2019-05-29 13:29 ` Richard Biener
2019-05-29 16:01   ` Aldy Hernandez
2019-05-29 16:15     ` Jeff Law
2019-05-29 16:20       ` Aldy Hernandez
2019-05-31  1:04         ` Jeff Law
2019-05-31  9:02           ` Richard Biener
2019-05-31 15:03             ` Jeff Law
2019-06-03 13:13             ` Aldy Hernandez
2019-06-03 22:30               ` Jeff Law
2019-06-04 11:23                 ` Richard Biener
2019-06-04 13:40                   ` Jeff Law
2019-06-04 15:04                     ` Richard Biener
2019-06-05 21:12                       ` Jeff Law
2019-06-06  7:31                         ` Richard Biener
2019-06-06 17:38                           ` Jeff Law
2019-06-06 22:11                           ` Aldy Hernandez
2019-06-07 19:26                             ` Jeff Law
2019-05-29 16:06   ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).