LCOV - code coverage report
Current view: top level - gcc - gimple-array-bounds.h (source / functions) Coverage Total Hit
Test: gcc.info Lines: 100.0 % 1 1
Test Date: 2024-04-20 14:03:02 Functions: - 0 0
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : /* Array bounds checking.
       2                 :             :    Copyright (C) 2020-2024 Free Software Foundation, Inc.
       3                 :             : 
       4                 :             : This file is part of GCC.
       5                 :             : 
       6                 :             : GCC is free software; you can redistribute it and/or modify
       7                 :             : it under the terms of the GNU General Public License as published by
       8                 :             : the Free Software Foundation; either version 3, or (at your option)
       9                 :             : any later version.
      10                 :             : 
      11                 :             : GCC is distributed in the hope that it will be useful,
      12                 :             : but WITHOUT ANY WARRANTY; without even the implied warranty of
      13                 :             : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14                 :             : GNU General Public License for more details.
      15                 :             : 
      16                 :             : You should have received a copy of the GNU General Public License
      17                 :             : along 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                 :             : 
      25                 :      213472 : class array_bounds_checker
      26                 :             : {
      27                 :             :   friend class check_array_bounds_dom_walker;
      28                 :             : 
      29                 :             : public:
      30                 :             :   array_bounds_checker (struct function *, range_query *);
      31                 :             :   void check ();
      32                 :             : 
      33                 :             : private:
      34                 :             :   static tree check_array_bounds (tree *tp, int *walk_subtree, void *data);
      35                 :             :   bool check_array_ref (location_t, tree, gimple *, bool ignore_off_by_one);
      36                 :             :   bool check_mem_ref (location_t, tree, bool ignore_off_by_one);
      37                 :             :   void check_addr_expr (location_t, tree, gimple *);
      38                 :             :   void get_value_range (irange &r, const_tree op, gimple *);
      39                 :             : 
      40                 :             :   /* Current function.  */
      41                 :             :   struct function *fun;
      42                 :             :   /* A pointer_query object to store information about pointers and
      43                 :             :      their targets in.  */
      44                 :             :   pointer_query m_ptr_qry;
      45                 :             :   /* Current statement.  */
      46                 :             :   gimple *m_stmt;
      47                 :             : };
      48                 :             : 
      49                 :             : #endif // GCC_GIMPLE_ARRAY_BOUNDS_H
        

Generated by: LCOV version 2.1-beta

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.