aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ifelse-1.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-10-16 17:46:06 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2024-10-16 17:46:06 +0200
commit6756250fcbed4a214c30de94e4ec68ea130528d5 (patch)
tree9fa6ae4f2558f5c6e52f127b2ae3dccfd8cc2994 /gcc/testsuite/gcc.dg/ifelse-1.c
parentf5224caf53a4f17b190497c00c505977d358bef9 (diff)
downloadgcc-6756250fcbed4a214c30de94e4ec68ea130528d5.zip
gcc-6756250fcbed4a214c30de94e4ec68ea130528d5.tar.gz
gcc-6756250fcbed4a214c30de94e4ec68ea130528d5.tar.bz2
c: Add some checking asserts to named loops handling code
Jonathan mentioned an unnamed static analyzer reported issue in c_finish_bc_name. It is actually a false positive, because the construction of the loop_names vector guarantees that the last element of the vector (if the vector is non-empty) always has either C_DECL_LOOP_NAME (l) or C_DECL_SWITCH_NAME (l) (or both) flags set, so c will be always non-NULL after the if at the start of the loops. The following patch is an attempt to help those static analyzers (though dunno if it actually helps), by adding a checking assert. 2024-10-16 Jakub Jelinek <jakub@redhat.com> * c-decl.cc (c_get_loop_names): Add checking assert that c is non-NULL in the loop. (c_finish_bc_name): Likewise.
Diffstat (limited to 'gcc/testsuite/gcc.dg/ifelse-1.c')
0 files changed, 0 insertions, 0 deletions