https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104089
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>: https://gcc.gnu.org/g:2aefe248aa4160205c44808166393a42031d2dea commit r12-6700-g2aefe248aa4160205c44808166393a42031d2dea Author: David Malcolm <dmalc...@redhat.com> Date: Tue Jan 18 11:41:19 2022 -0500 analyzer: fix ICE on unary ops folding to casts of constants [PR104089] gcc/analyzer/ChangeLog: PR analyzer/104089 * region-model-manager.cc (region_model_manager::get_or_create_constant_svalue): Assert that we have a CONSTANT_CLASS_P. (region_model_manager::maybe_fold_unaryop): Only fold a constant when fold_unary's result is a constant or a cast of a constant. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/pr104089.c: New test. PR analyzer/104089 Signed-off-by: David Malcolm <dmalc...@redhat.com>