fix to tree profiling branch.

Kenneth Zadeck zadeck@naturalbridge.com
Sun Mar 6 22:01:00 GMT 2005


Fixed missing case in scanning tree code.  This only seems to have shown 
up in fortran, but is very common there.
Tested on i686.


2005-03-06  Kenneth Zadeck <zadeck@naturalbridge.com>
    * tree-promote-statics.c (try-replace): Fixed missing CONST_DECL case.


Index: tree-promote-statics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-promote-statics.c,v
retrieving revision 1.1.4.2
diff -c -3 -p -r1.1.4.2 tree-promote-statics.c
*** tree-promote-statics.c    1 Mar 2005 23:08:11 -0000    1.1.4.2
--- tree-promote-statics.c    6 Mar 2005 16:48:19 -0000
*************** try_replace (tree *tptr)
*** 296,301 ****
--- 296,302 ----
    while (!SSA_VAR_P (t)
       && (!CONSTANT_CLASS_P (t))
       && TREE_CODE (t) != LABEL_DECL
+      && TREE_CODE (t) != CONST_DECL
       && TREE_CODE (t) != FUNCTION_DECL)
      {
        if (TREE_CODE (t) == ARRAY_REF)



More information about the Gcc-patches mailing list