This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix AIX bootstrap comparison due to empty *-tests.c and selftest* files (PR bootstrap/80531)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: David Edelsohn <dje dot gcc at gmail dot com>, David Malcolm <dmalcolm at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 Apr 2017 10:56:08 +0200
- Subject: Re: [PATCH] Fix AIX bootstrap comparison due to empty *-tests.c and selftest* files (PR bootstrap/80531)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 609B39D420
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 609B39D420
- References: <20170427202057.GE1809@tucnak> <BB8CB380-5CB5-47FB-B67D-4D50000AAFEA@suse.de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Apr 28, 2017 at 07:56:23AM +0200, Richard Biener wrote:
> On April 27, 2017 10:20:57 PM GMT+02:00, Jakub Jelinek <jakub@redhat.com> wrote:
> >This is something that fails bootstrap newly in GCC 7 and only with
> >(now on the branch default --enable-checking=release (or
> >--disable-checking)). The problem is that the *-tests.c and
> >selftest*.c
> >sources after including some headers have the whole body guarded with
> >#if CHECKING_P
> >and with release checking thus there are no global symbols.
> >symtab_node::debug_symtab is a static inline method with DEBUG_FUNCTION
> >and thus
> >is emitted (due to __attribute__((used))) - something we should really
> >fix,
> >by moving its definition out of cgraph.h.
>
> Would that alone fix it? Or making it non-static inline?
>
> I suppose graphite-* may have a similar issue if you build without ISL.
On the single file that has been actual problem (function-tests.c) the
following does work (the GLOBAL..._random_seed) symbol is gone.
But I haven't bootstrapped/regtested it on AIX nor x86_64-linux.
Shall I go for this instead, or just apply it in addition to that on trunk?
2017-04-28 Jakub Jelinek <jakub@redhat.com>
* cgraph.h (symtab_node::debug_symtab): No longer inline.
* symtab.c (symtab_node::debug_symtab): Move definition here.
--- gcc/cgraph.h.jj 2017-04-04 07:32:50.000000000 +0200
+++ gcc/cgraph.h 2017-04-28 10:38:51.989029437 +0200
@@ -415,10 +415,7 @@ public:
static void dump_table (FILE *);
/* Dump symbol table to stderr. */
- static inline DEBUG_FUNCTION void debug_symtab (void)
- {
- dump_table (stderr);
- }
+ static void DEBUG_FUNCTION debug_symtab (void);
/* Verify symbol table for internal consistency. */
static DEBUG_FUNCTION void verify_symtab_nodes (void);
--- gcc/symtab.c.jj 2017-02-03 17:09:01.000000000 +0100
+++ gcc/symtab.c 2017-04-28 10:41:04.917307155 +0200
@@ -924,6 +924,14 @@ symtab_node::dump_table (FILE *f)
node->dump (f);
}
+/* Dump symbol table to stderr. */
+
+DEBUG_FUNCTION void
+symtab_node::debug_symtab (void)
+{
+ dump_table (stderr);
+}
+
/* Return the cgraph node that has ASMNAME for its DECL_ASSEMBLER_NAME.
Return NULL if there's no such node. */
Jakub