This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RTL gensupport - fix warning when using a match_scratch predicate


All
 
Currently using the match_scratch predicate on a destination operand will trigger the warning
 
                    "warning: destination operand 0 allows non-lvalue",
 
This happends because add_predicate_code()  will set the pred->allows_non_lvalue when
it encounters a SCRATCH rtx code which subsequently triggers the above genrecog warning/
 
Graham
                  
gcc/ChangeLog
    * gensupport.c:: (add_predicate_code) Also exclude SCRATCH from rtx codes which allow
     non-lvalues.
 
Index: gcc/gensupport.c
=========================================
--- gcc/gensupport.c    (revision 198200)
+++ gcc/gensupport.c    (working copy)
@@ -2732,7 +2732,8 @@
          && code != MEM
          && code != CONCAT
          && code != PARALLEL
-         && code != STRICT_LOW_PART)
+         && code != STRICT_LOW_PART
+         && code != SCRATCH)
        pred->allows_non_lvalue = true;
       if (pred->num_codes == 1)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]