"Iyer, Balaji V" <balaji.v.i...@intel.com> writes: > I am trying to mark all for loop *top* labels with a integer value. > This integer value is an index to another data structure that I'm trying to > maintain. > > I just added the index value (as unsigned int) into the following data > structure (in tree.h): > > struct GTY(()) tree_label_decl { > struct tree_decl_with_rtl common; > int label_decl_uid; > int eh_landing_pad_nr; > unsigned int My_INDEX; /* <== THIS IS WHAT I AM TRYING TO DO */ > }; > > I put the above modification and then I set My_INDEX in the "top" tree (top > is created using build1(LABEL_EXPR, void_type_node, NULL_TREE)) in the > c_finish_loop() and tried to reconfigure & build the gcc. Now, it is crashing > when it is trying to compile the files using "prev-gcc/xgcc" (mainly at the > gimplification phase).
The variable top in c_finish_loop is a LABEL_EXPR. tree_label_decl is used for a LABEL_DECL. If you are realliy seeing My_INDEX for top, then 1) you are doing something wrong; 2) I don't understand how that could work at all. What does the actual code in c_finish_loop look like? A tip: after adding your field to tree_label_decl, #define LABEL_DECL_MY_INDEX along the lines of LABEL_DECL_UID and friends. In particular, make sure you use LABEL_DECL_CHECK. Then always access the field using LABEL_DECL_MY_INDEX. And make sure that you configure with --enable-checking; --enable-checking is the default in the development sources, but in the release sources the default is --enable-checking=release. You want --enable-checking, not --enable-checking=release. Doing that will cause gcc to abort if you ever try to access your new field incorrectly. Ian