------- Comment #3 from jvdelisle at gcc dot gnu dot org 2010-02-24 04:01 ------- Here is the fix:
Index: transfer.c =================================================================== --- transfer.c (revision 156986) +++ transfer.c (working copy) @@ -926,7 +926,7 @@ require_type (st_parameter_dt *dtp, bt expected, b return 0; sprintf (buffer, "Expected %s for item %d in formatted transfer, got %s", - type_name (expected), dtp->u.p.item_count, type_name (actual)); + type_name (expected), dtp->u.p.item_count - 1, type_name (actual)); format_error (dtp, f, buffer); return 1; The reason this is the right fix is that for formatted transfers, the loop that calls the transfers is executed an initial time to set up the transfer and then looped throughthe items. Item count is always one greater. We could initialize it to -1, but why bother, the dtp structure is zeroed when created. The above is the minimal fix. I will add a comment to explain this when I commit. Regression tests OK. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43155