From patchwork Thu Dec 22 05:22:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 132773 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 E3721B6FD3 for ; Thu, 22 Dec 2011 16:23:08 +1100 (EST) Received: (qmail 8074 invoked by alias); 22 Dec 2011 05:23:04 -0000 Received: (qmail 8065 invoked by uid 22791); 22 Dec 2011 05:23:03 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Dec 2011 05:22:44 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBM5Mh9g029098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 22 Dec 2011 00:22:44 -0500 Received: from greed.delorie.com (ovpn-113-126.phx2.redhat.com [10.3.113.126]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pBM5MgIk001177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 22 Dec 2011 00:22:43 -0500 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.14.4/8.14.4) with ESMTP id pBM5MfiN006679 for ; Thu, 22 Dec 2011 00:22:41 -0500 Received: (from dj@localhost) by greed.delorie.com (8.14.4/8.14.4/Submit) id pBM5Mf4u006678; Thu, 22 Dec 2011 00:22:41 -0500 Date: Thu, 22 Dec 2011 00:22:41 -0500 Message-Id: <201112220522.pBM5Mf4u006678@greed.delorie.com> From: DJ Delorie To: gcc-patches@gcc.gnu.org Subject: gcov-io.h type typo X-IsSubscribed: yes 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 This field is built as a gcov_unsigned_t but declared as a plain "unsigned", which breaks all int16 targets: /* n_functions */ field = build_decl (BUILTINS_LOCATION, FIELD_DECL, NULL_TREE, get_gcov_unsigned_t ()); DECL_CHAIN (field) = fields; fields = field; Assuming we want to support more then 65536 functions on int16 targets, how about this semi-obvious patch? Index: gcov-io.h =================================================================== --- gcov-io.h (revision 182614) +++ gcov-io.h (working copy) @@ -444,13 +444,13 @@ struct gcov_info gcov_unsigned_t stamp; /* uniquifying time stamp */ const char *filename; /* output file name */ gcov_merge_fn merge[GCOV_COUNTERS]; /* merge functions (null for unused) */ - unsigned n_functions; /* number of functions */ + gcov_unsigned_t n_functions; /* number of functions */ const struct gcov_fn_info *const *functions; /* pointer to pointers to function information */ }; /* Register a new object file module. */ extern void __gcov_init (struct gcov_info *) ATTRIBUTE_HIDDEN;