This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix AIX bootstrap comparison due to empty *-tests.c and selftest* files (PR bootstrap/80531)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]