From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24823 invoked by alias); 5 Mar 2008 09:08:32 -0000 Received: (qmail 24813 invoked by uid 22791); 5 Mar 2008 09:08:31 -0000 X-Spam-Check-By: sourceware.org Received: from gv-out-0910.google.com (HELO gv-out-0910.google.com) (216.239.58.184) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Mar 2008 09:08:09 +0000 Received: by gv-out-0910.google.com with SMTP id r4so1062005gve.10 for ; Wed, 05 Mar 2008 01:08:06 -0800 (PST) Received: by 10.143.162.8 with SMTP id p8mr720619wfo.63.1204708084649; Wed, 05 Mar 2008 01:08:04 -0800 (PST) Received: by 10.142.177.9 with HTTP; Wed, 5 Mar 2008 01:08:04 -0800 (PST) Message-ID: Date: Wed, 05 Mar 2008 09:08:00 -0000 From: "Bernd Jendrissek" To: gcc-help@gcc.gnu.org Subject: gcov vs. multiple objects derived from the same source MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00035.txt.bz2 [Please keep me Cc'ed as I am not subscribed.] At work I have a bunch of source files that want to be compiled with different CPPFLAGS. Since we now use automake, this implies that if foo.c gets compiled into ${bindir}/bar, we get a file bar-foo.o, and the same for the siblings of bar. I'm worried that when I do gcov *.o, gcov might not notice that two objects are derived from the same file, and thus the coverage notes might reflect coverage only of a subset of the use cases - those that exercise foo.c through ${bindir}/bar but not those that exercise it through ${bindir}/baz. Are there any guarantees (or specific lack thereof) about gcov's behaviour under these circumstances?