From patchwork Sun Sep 12 11:44:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FX Coudert X-Patchwork-Id: 64547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 26437B6EF2 for ; Sun, 12 Sep 2010 21:44:48 +1000 (EST) Received: (qmail 14533 invoked by alias); 12 Sep 2010 11:44:42 -0000 Received: (qmail 14515 invoked by uid 22791); 12 Sep 2010 11:44:41 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Sep 2010 11:44:37 +0000 Received: by wye20 with SMTP id 20so5062286wye.20 for ; Sun, 12 Sep 2010 04:44:34 -0700 (PDT) Received: by 10.216.188.132 with SMTP id a4mr3100127wen.61.1284291874721; Sun, 12 Sep 2010 04:44:34 -0700 (PDT) Received: from [192.168.0.100] (chufi.coudert.name [88.162.139.106]) by mx.google.com with ESMTPS id k46sm3088439weq.10.2010.09.12.04.44.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 12 Sep 2010 04:44:33 -0700 (PDT) From: FX Subject: [libgfortran, patch] Missing return in intrinsics/pack_generic.c Date: Sun, 12 Sep 2010 13:44:32 +0200 Message-Id: <0412D7B7-8E47-4FC6-8D2E-5EDE8F03B2D3@gmail.com> Cc: gcc-patches@gcc.gnu.org To: Fortran List Mime-Version: 1.0 (Apple Message framework v1081) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list 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