So the comment change in iq2000_function_arg is trivial.

expand_one_builtin is pretty obvious once you look at the code. We're currently falling through from the zero-operand case to the one operand case. That results in reading from op[0], which is almost certainly wrong. So rather than falling through a break is appropriate.

Installing on the trunk.

Jeff
commit a9d7639464a003c55952014c44914182a6a8754f
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed Oct 26 16:10:40 2016 +0000

        * config/iq2000/iq2000.c (iq2000_function_arg): Adjust fallthru
        comment.
        (expand_one_builtin): Add missing break.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241573 
138bc75d-0d04-0410-961f-82ee72b054a4

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4aec3eb..afa4562 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
 2016-10-26  Jeff Law  <l...@redhat.com>
 
+       * config/iq2000/iq2000.c (iq2000_function_arg): Adjust fallthru
+       comment.
+       (expand_one_builtin): Add missing break.
+
        * config/m32c/m32c.c (encode_pattern_1): Add fallthru comment.
        (m32c_legitimate_address_p): Likewise.
 
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index 7be7ee5..2c936da 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -1244,7 +1244,7 @@ iq2000_function_arg (cumulative_args_t cum_v, 
machine_mode mode,
       gcc_assert (GET_MODE_CLASS (mode) == MODE_COMPLEX_INT
                  || GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT);
 
-      /* Drops through.  */
+      /* FALLTHRU */
     case BLKmode:
       if (type != NULL_TREE && TYPE_ALIGN (type) > (unsigned) BITS_PER_WORD)
        cum->arg_words += (cum->arg_words & 1);
@@ -2620,6 +2620,7 @@ expand_one_builtin (enum insn_code icode, rtx target, 
tree exp,
     {
     case 0:
        pat = GEN_FCN (icode) (target);
+       break;
     case 1:
       if (target)
        pat = GEN_FCN (icode) (target, op[0]);

Reply via email to