OSDN Git Service

(__va_copy): New definition.
[pf3gnuchains/gcc-fork.git] / gcc / stmt.c
index 21e4932..a3f42d5 100644 (file)
@@ -1453,13 +1453,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
 #endif
            break;
 
-         case 'p':  case 'g':  case 'r':
-           /* Whether or not a numeric constraint allows a register is
-              decided by the matching constraint, and so there is no need
-              to do anything special with them.  We must handle them in
-              the default case, so that we don't unnecessarily force
-              operands to memory.  */
          case '0':  case '1':  case '2':  case '3':  case '4':
+         case '5':  case '6':  case '7':  case '8':  case '9':
+           error ("matching constraint not valid in output operand");
+           break;
+
+         case 'p':  case 'g':  case 'r':
          default:
            allows_reg = 1;
            break;
@@ -1564,13 +1563,20 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
 #endif
            break;
 
-         case 'p':  case 'g':  case 'r':
            /* Whether or not a numeric constraint allows a register is
               decided by the matching constraint, and so there is no need
               to do anything special with them.  We must handle them in
               the default case, so that we don't unnecessarily force
               operands to memory.  */
          case '0':  case '1':  case '2':  case '3':  case '4':
+         case '5':  case '6':  case '7':  case '8':  case '9':
+           if (TREE_STRING_POINTER (TREE_PURPOSE (tail))[j]
+               >= '0' + noutputs)
+             error ("matching constraint references invalid operand number");
+
+           /* ... fall through ... */
+
+         case 'p':  case 'g':  case 'r':
          default:
            allows_reg = 1;
            break;
@@ -2717,14 +2723,14 @@ expand_return (retval)
       tree expr;
 
       do_jump (TREE_OPERAND (retval_rhs, 0), label, NULL_RTX);
-      expr = build (MODIFY_EXPR, TREE_TYPE (current_function_decl),
+      expr = build (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (current_function_decl)),
                    DECL_RESULT (current_function_decl),
                    TREE_OPERAND (retval_rhs, 1));
       TREE_SIDE_EFFECTS (expr) = 1;
       expand_return (expr);
       emit_label (label);
 
-      expr = build (MODIFY_EXPR, TREE_TYPE (current_function_decl),
+      expr = build (MODIFY_EXPR, TREE_TYPE (TREE_TYPE (current_function_decl)),
                    DECL_RESULT (current_function_decl),
                    TREE_OPERAND (retval_rhs, 2));
       TREE_SIDE_EFFECTS (expr) = 1;
@@ -2913,6 +2919,7 @@ expand_return (retval)
       result_reg = gen_reg_rtx (result_reg_mode);
 
       /* Now that the value is in pseudos, copy it to the result reg(s).  */
+      expand_cleanups_to (NULL_TREE);
       emit_queue ();
       free_temp_slots ();
       for (i = 0; i < n_regs; i++)
@@ -2930,7 +2937,10 @@ expand_return (retval)
       && GET_CODE (DECL_RTL (DECL_RESULT (current_function_decl))) == REG)
     {
       /* Calculate the return value into a pseudo reg.  */
-      val = expand_expr (retval_rhs, NULL_RTX, VOIDmode, 0);
+      val = gen_reg_rtx (DECL_MODE (DECL_RESULT (current_function_decl)));
+      val = expand_expr (retval_rhs, val, GET_MODE (val), 0);
+      val = force_not_mem (val);
+      expand_cleanups_to (NULL_TREE);
       emit_queue ();
       /* All temporaries have now been used.  */
       free_temp_slots ();
@@ -2942,6 +2952,7 @@ expand_return (retval)
       /* No cleanups or no hard reg used;
         calculate value into hard return reg.  */
       expand_expr (retval, const0_rtx, VOIDmode, 0);
+      expand_cleanups_to (NULL_TREE);
       emit_queue ();
       free_temp_slots ();
       expand_value_return (DECL_RTL (DECL_RESULT (current_function_decl)));
@@ -3456,6 +3467,7 @@ expand_decl (decl)
                          (TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl)))
                           / BITS_PER_UNIT));
     }
+
   else if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
     {
       /* Variable of fixed size that goes on the stack.  */
@@ -5578,12 +5590,18 @@ group_case_nodes (head)
   while (node)
     {
       rtx lb = next_real_insn (label_rtx (node->code_label));
+      rtx lb2;
       case_node_ptr np = node;
 
       /* Try to group the successors of NODE with NODE.  */
       while (((np = np->right) != 0)
             /* Do they jump to the same place?  */
-            && next_real_insn (label_rtx (np->code_label)) == lb
+            && ((lb2 = next_real_insn (label_rtx (np->code_label))) == lb
+                || (lb != 0 && lb2 != 0
+                    && simplejump_p (lb)
+                    && simplejump_p (lb2)
+                    && rtx_equal_p (SET_SRC (PATTERN (lb)),
+                                    SET_SRC (PATTERN (lb2)))))
             /* Are their ranges consecutive?  */
             && tree_int_cst_equal (np->low,
                                    fold (build (PLUS_EXPR,