--- src/gnu/usr.bin/cc34/cc_prep/protector.c 2005/08/27 21:03:51 1.2 +++ src/gnu/usr.bin/cc34/cc_prep/protector.c 2007/01/20 03:16:33 1.3 @@ -1146,6 +1146,23 @@ sweep_string_variable (rtx sweep_var, HO switch (GET_CODE (sweep_var)) { + case REG: + /* Kevin F. Quinn May 2006 + * arrange_var_order can clearly call this function with + * the code REG in sweep_var, so we need to handle the case + * at least. This does nothing, as it appears there's nothing + * to sweep. + * Reached if a class variable is passed by value. + */ + if (warn_stack_protector) + { + warning ("sweep string type REG (%d) ignored - rtl:\n", + GET_CODE(sweep_var)); + print_rtl(stderr,sweep_var); + fputs("\n",stderr); + } + return; + break; case MEM: if (GET_CODE (XEXP (sweep_var, 0)) == ADDRESSOF && GET_CODE (XEXP (XEXP (sweep_var, 0), 0)) == REG) @@ -1156,6 +1173,13 @@ sweep_string_variable (rtx sweep_var, HO sweep_offset = INTVAL (sweep_var); break; default: + if (warn_stack_protector) + { + warning ("sweep string type %d unexpected - rtl:\n", + GET_CODE(sweep_var)); + print_rtl(stderr,sweep_var); + fputs("\n",stderr); + } abort (); }