GCC Middle and Back End API Reference
gimple-array-bounds.h
Go to the documentation of this file.
1/* Array bounds checking.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef GCC_GIMPLE_ARRAY_BOUNDS_H
21#define GCC_GIMPLE_ARRAY_BOUNDS_H
22
23#include "pointer-query.h"
24
26{
28
29public:
31 void check ();
32
33private:
34 static tree check_array_bounds (tree *tp, int *walk_subtree, void *data);
39
40 /* Current function. */
41 struct function *fun;
42 /* A pointer_query object to store information about pointers and
43 their targets in. */
45 /* Current statement. */
47};
48
49#endif // GCC_GIMPLE_ARRAY_BOUNDS_H
Definition gimple-array-bounds.h:26
pointer_query m_ptr_qry
Definition gimple-array-bounds.h:44
gimple * m_stmt
Definition gimple-array-bounds.h:46
bool check_array_ref(location_t, tree, gimple *, bool ignore_off_by_one)
Definition gimple-array-bounds.cc:339
void get_value_range(irange &r, const_tree op, gimple *)
Definition gimple-array-bounds.cc:50
bool check_mem_ref(location_t, tree, bool ignore_off_by_one)
Definition gimple-array-bounds.cc:478
void check_addr_expr(location_t, tree, gimple *)
Definition gimple-array-bounds.cc:640
array_bounds_checker(struct function *, range_query *)
Definition gimple-array-bounds.cc:42
struct function * fun
Definition gimple-array-bounds.h:41
static tree check_array_bounds(tree *tp, int *walk_subtree, void *data)
Definition gimple-array-bounds.cc:789
void check()
Definition gimple-array-bounds.cc:886
Definition gimple-array-bounds.cc:838
Definition genoutput.cc:147
Definition value-range.h:273
Definition pointer-query.h:162
Definition value-query.h:55
const union tree_node * const_tree
Definition coretypes.h:98
union tree_node * tree
Definition coretypes.h:97
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
poly_int< N, C > r
Definition poly-int.h:770
Definition function.h:249
Definition gimple.h:225