From patchwork Sun Sep 12 11:44:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [libgfortran] Missing return in intrinsics/pack_generic.c Date: Sun, 12 Sep 2010 01:44:32 -0000 From: FX X-Patchwork-Id: 64547 Message-Id: <0412D7B7-8E47-4FC6-8D2E-5EDE8F03B2D3@gmail.com> To: Fortran List Cc: gcc-patches@gcc.gnu.org Dear all, In the giant switch statement in intrinsics/pack_generic.c, one of the branches is missing a return statement after the call to pack_i8. Because all branches are otherwise identical and feature the return statement, I consider it obvious. Because the generic pack_internal() function will be called after pack_i8(), this probably leads to suboptimal performance, but not to wrong results (the second packing should be a noop). I've certainly not managed to create a testcase that would trigger it, so none was committed. Bootstrapped and regtested on x86_64-linux, OK to commit? FX 2010-09-12 Francois-Xavier Coudert * intrinsics/pack_generic.c (pack): Add missing return. Index: intrinsics/pack_generic.c =================================================================== --- intrinsics/pack_generic.c (revision 164213) +++ intrinsics/pack_generic.c (working copy) @@ -374,6 +373,7 @@ pack (gfc_array_char *ret, const gfc_arr { pack_i8 ((gfc_array_i8 *) ret, (gfc_array_i8 *) array, (gfc_array_l1 *) mask, (gfc_array_i8 *) vector); + return; } #ifdef HAVE_GFC_INTEGER_16