PR analyzer/94099 and PR analyzer/94105 both report ICEs relating to calling region_model::get_lvalue on a NOP_EXPR. PR analyzer/94099's ICE happens when generating a checker_path when encountering an unhandled tree code (NOP_EXPR) in get_lvalue with a NULL context (from for_each_state_change). PR analyzer/94105 ICE happens when handling an ARRAY_REF where the first operand is a NOP_EXPR: the unhandled tree code gives us a symbolic_region, but the case for ARRAY_REF assumes we have an array_region. This patch fixes the ICEs by handling NOP_EXPR within region_model::get_lvalue, and bulletproofs both of the above sources of failure. gcc/analyzer/ChangeLog: PR analyzer/94099 PR analyzer/94105 * diagnostic-manager.cc (for_each_state_change): Bulletproof against errors in get_rvalue by passing a tentative_region_model_context and rejecting if there's an error. * region-model.cc (region_model::get_lvalue_1): When handling ARRAY_REF, handle results of error-handling. Handle NOP_EXPR. gcc/testsuite/ChangeLog: PR analyzer/94099 PR analyzer/94105 * gcc.dg/analyzer/pr94099.c: New test. * gcc.dg/analyzer/pr94105.c: New test.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ada | Loading commit data... | |
brig.dg | Loading commit data... | |
c-c++-common | Loading commit data... | |
config | Loading commit data... | |
g++.dg | Loading commit data... | |
g++.old-deja | Loading commit data... | |
g++.target | Loading commit data... | |
gcc.c-torture | Loading commit data... | |
gcc.dg | Loading commit data... | |
gcc.dg-selftests | Loading commit data... | |
gcc.misc-tests | Loading commit data... | |
gcc.src | Loading commit data... | |
gcc.target | Loading commit data... | |
gcc.test-framework | Loading commit data... | |
gdc.dg | Loading commit data... | |
gdc.test | Loading commit data... | |
gfortran.dg | Loading commit data... | |
gfortran.fortran-torture | Loading commit data... | |
gnat.dg | Loading commit data... | |
go.dg | Loading commit data... | |
go.go-torture/execute | Loading commit data... | |
go.test | Loading commit data... | |
jit.dg | Loading commit data... | |
lib | Loading commit data... | |
obj-c++.dg | Loading commit data... | |
objc | Loading commit data... | |
objc-obj-c++-shared | Loading commit data... | |
objc.dg | Loading commit data... | |
selftests | Loading commit data... | |
.gitattributes | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog-1993-2007 | Loading commit data... | |
ChangeLog-2008 | Loading commit data... | |
ChangeLog-2009 | Loading commit data... | |
ChangeLog-2010 | Loading commit data... | |
ChangeLog-2011 | Loading commit data... | |
ChangeLog-2012 | Loading commit data... | |
ChangeLog-2013 | Loading commit data... | |
ChangeLog-2014 | Loading commit data... | |
ChangeLog-2015 | Loading commit data... | |
ChangeLog-2016 | Loading commit data... | |
ChangeLog-2017 | Loading commit data... | |
ChangeLog-2018 | Loading commit data... | |
ChangeLog-2019 | Loading commit data... | |
ChangeLog.graphite | Loading commit data... | |
ChangeLog.jit | Loading commit data... | |
ChangeLog.ptr | Loading commit data... | |
ChangeLog.tree-ssa | Loading commit data... | |
README | Loading commit data... | |
README.compat | Loading commit data... | |
README.gcc | Loading commit data... |