Skip to content
Snippets Groups Projects
Commit 7a48d8d2 authored by Aldy Hernandez's avatar Aldy Hernandez
Browse files

Initialize value in bit_value_unop.

bit_value_binop initializes VAL regardless of the final mask.  It even
has a comment to that effect:

  /* Ensure that VAL is initialized (to any value).  */

However, bit_value_unop, which in theory shares the same API, does not.
This causes range-ops to choke on uninitialized VALs for some inputs to
ABS.

Instead of fixing the callers, it's cleaner to make bit_value_unop and
bit_value_binop consistent.

gcc/ChangeLog:

	* tree-ssa-ccp.cc (bit_value_unop): Initialize val when appropriate.
parent ad0dde0a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment