Home | History | Annotate | Line # | Download | only in gdb.cp
      1 /* This testcase is part of GDB, the GNU debugger.
      2 
      3    Copyright 2019-2024 Free Software Foundation, Inc.
      4 
      5    This program is free software; you can redistribute it and/or modify
      6    it under the terms of the GNU General Public License as published by
      7    the Free Software Foundation; either version 3 of the License, or
      8    (at your option) any later version.
      9 
     10    This program is distributed in the hope that it will be useful,
     11    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13    GNU General Public License for more details.
     14 
     15    You should have received a copy of the GNU General Public License
     16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
     17 
     18 /* The code below must remain identical to the block of code in
     19    step-and-next-inline.cc.  */
     20 
     21 #include <stdlib.h>
     22 
     23 struct tree
     24 {
     25   volatile int x;
     26   volatile int z;
     27 };
     28 
     29 #define TREE_TYPE(NODE) (*tree_check (NODE, 0))
     30 
     31 inline tree *
     32 tree_check (tree *t, int i)
     33 {
     34   if (t->x != i)
     35     abort();
     36   tree *x = t;
     37   return x;
     38 } // tree_check
     39