[Bug analyzer/104159] ICE: in finalize, at vector-builder.h:513 with -O -fanalyzer
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 22 15:27:24 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104159
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:45b999f642a531c083c982dda79fa6ad65730a7c
commit r12-6817-g45b999f642a531c083c982dda79fa6ad65730a7c
Author: David Malcolm <dmalcolm@redhat.com>
Date: Fri Jan 21 09:56:56 2022 -0500
analyzer: fix ICE on vector casts [PR104159]
PR analyzer/104159 describes an ICE attempting to convert a vector_cst,
which occurs when symbolically executing within a recursive call on:
_4 = BIT_FIELD_REF <w_3(D), 32, 0>;
_1 = VIEW_CONVERT_EXPR<T>(_4);
where the BIT_FIELD_REF leads to a get_or_create_cast from
VEC<long, 8> to VEC<unsigned 4>
which get_code_for_cast erroneously picks NOP_EXPR for the cast, leading
to a bogus input to the VIEW_CONVERT_EXPR.
This patch fixes the issue by giving up on attempts to cast symbolic
values of vector types, treating the result of such casts as unknowable.
gcc/analyzer/ChangeLog:
PR analyzer/104159
* region-model-manager.cc
(region_model_manager::get_or_create_cast): Bail out if the types
are the same. Don't attempt to handle casts involving vector
types.
gcc/testsuite/ChangeLog:
PR analyzer/104159
* gcc.dg/analyzer/torture/pr104159.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
More information about the Gcc-bugs
mailing list