public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64
@ 2009-10-07 21:12 meissner at gcc dot gnu dot org
2009-10-07 21:14 ` [Bug bootstrap/41626] " meissner at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: meissner at gcc dot gnu dot org @ 2009-10-07 21:12 UTC (permalink / raw)
To: gcc-bugs
GCC does not bootstrap on powerpc64. It fails in the 2nd stage, when it links
build/gensupport.o. On the powerpc, the statements:
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
On the powerpc generate a reference to an unknown external 'obstack', while on
the x86_64, it generates 'obstack' as a bss item. The option
-fkeep-static-consts does not help the issue.
--
Summary: GCC does not bootstrap on powerpc64
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: meissner at gcc dot gnu dot org
GCC build triplet: powerpc64-unknown-linux-gnu
GCC host triplet: powerpc64-unknown-linux-gnu
GCC target triplet: powerpc64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/41626] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
@ 2009-10-07 21:14 ` meissner at gcc dot gnu dot org
2009-10-07 21:16 ` [Bug bootstrap/41626] [4.5 Regression] " rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: meissner at gcc dot gnu dot org @ 2009-10-07 21:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from meissner at gcc dot gnu dot org 2009-10-07 21:14 -------
Created an attachment (id=18746)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18746&action=view)
Simplified test case that fails on the powerpc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
2009-10-07 21:14 ` [Bug bootstrap/41626] " meissner at gcc dot gnu dot org
@ 2009-10-07 21:16 ` rguenth at gcc dot gnu dot org
2009-10-07 22:01 ` meissner at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-07 21:16 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Summary|GCC does not bootstrap on |[4.5 Regression] GCC does
|powerpc64 |not bootstrap on powerpc64
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
2009-10-07 21:14 ` [Bug bootstrap/41626] " meissner at gcc dot gnu dot org
2009-10-07 21:16 ` [Bug bootstrap/41626] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2009-10-07 22:01 ` meissner at gcc dot gnu dot org
2009-10-07 22:25 ` [Bug middle-end/41626] " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: meissner at gcc dot gnu dot org @ 2009-10-07 22:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from meissner at gcc dot gnu dot org 2009-10-07 22:00 -------
Subversion revision 152520 is the revision that breaks this.
The change in question is:
009-10-07 Jan Hubicka <jh@suse.cz>
* lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has
no address taken.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-10-07 22:01 ` meissner at gcc dot gnu dot org
@ 2009-10-07 22:25 ` pinskia at gcc dot gnu dot org
2009-10-07 22:35 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-07 22:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2009-10-07 22:25 -------
This testcase works at -O0 but fails at -O1.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-10-07 22:25:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-10-07 22:25 ` [Bug middle-end/41626] " pinskia at gcc dot gnu dot org
@ 2009-10-07 22:35 ` pinskia at gcc dot gnu dot org
2009-10-07 22:38 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-07 22:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2009-10-07 22:34 -------
Reverting just the varpool.c file back to what it was, allows this testcase to
work.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-10-07 22:35 ` pinskia at gcc dot gnu dot org
@ 2009-10-07 22:38 ` pinskia at gcc dot gnu dot org
2009-10-08 13:11 ` danglin at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-07 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2009-10-07 22:37 -------
This part is what is causing it:
! /* When reading back varpool at LTO time, we re-construct the queue in
order
! to have "needed" list right by inserting all needed nodes into
varpool.
! We however don't want to re-analyze already analyzed nodes. */
! if (!analyzed)
! {
! gcc_assert (!in_lto_p);
! /* Compute the alignment early so function body expanders are
! already informed about increased alignment. */
! align_variable (decl, 0);
! if (DECL_INITIAL (decl))
! record_references_in_initializer (decl);
! }
Moving the record_references_in_initializer outside of the !analyzed condition
allows this testcase to work.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-10-07 22:38 ` pinskia at gcc dot gnu dot org
@ 2009-10-08 13:11 ` danglin at gcc dot gnu dot org
2009-10-08 14:19 ` hubicka at ucw dot cz
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: danglin at gcc dot gnu dot org @ 2009-10-08 13:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from danglin at gcc dot gnu dot org 2009-10-08 13:10 -------
Bootstrap also fails on armv5tejl-unknown-linux-gnueabi:
build/gensupport.o:(.data+0x20): undefined reference to `obstack'
--
danglin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |danglin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
` (6 preceding siblings ...)
2009-10-08 13:11 ` danglin at gcc dot gnu dot org
@ 2009-10-08 14:19 ` hubicka at ucw dot cz
2009-10-08 18:59 ` meissner at gcc dot gnu dot org
2009-10-08 19:00 ` meissner at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at ucw dot cz @ 2009-10-08 14:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hubicka at ucw dot cz 2009-10-08 14:18 -------
Subject: Re: [4.5 Regression] GCC does not bootstrap on powerpc64
Hi,
the following patch should fix the problem. I am
bootstrapping/regtesting it at x86_64-linux, but it would be nice to
know if it actually fixes the bootstrap. It does work on reduced
testcase for me.
Honza
* cgraphbuild.c (record_reference): When parameter DATA is NULL,
do not mark cgraph nodes as needed.
(record_references_in_initializer): Add new only_vars parameter.
* cgraph.h (record_references_in_initializer): New parameter.
* varasm.c (assemble_variable): Update call.
* varpool.c (varpool_analyze_pending_decls): Always look for
referenced vars.
Index: cgraphbuild.c
===================================================================
--- cgraphbuild.c (revision 152557)
+++ cgraphbuild.c (working copy)
@@ -33,13 +33,16 @@ along with GCC; see the file COPYING3.
#include "tree-pass.h"
/* Walk tree and record all calls and references to functions/variables.
- Called via walk_tree: TP is pointer to tree to be examined. */
+ Called via walk_tree: TP is pointer to tree to be examined.
+ When DATA is non-null, record references to callgraph.
+ */
static tree
-record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
+record_reference (tree *tp, int *walk_subtrees, void *data)
{
tree t = *tp;
tree decl;
+ bool do_callgraph = data != NULL;
switch (TREE_CODE (t))
{
@@ -57,7 +60,7 @@ record_reference (tree *tp, int *walk_su
/* Record dereferences to the functions. This makes the
functions reachable unconditionally. */
decl = TREE_OPERAND (*tp, 0);
- if (TREE_CODE (decl) == FUNCTION_DECL)
+ if (TREE_CODE (decl) == FUNCTION_DECL && do_callgraph)
cgraph_mark_address_taken_node (cgraph_node (decl));
break;
@@ -218,13 +221,15 @@ struct gimple_opt_pass pass_build_cgraph
};
/* Record references to functions and other variables present in the
- initial value of DECL, a variable. */
+ initial value of DECL, a variable.
+ When ONLY_VARS is true, we mark needed only variables, not functions. */
void
-record_references_in_initializer (tree decl)
+record_references_in_initializer (tree decl, bool only_vars)
{
struct pointer_set_t *visited_nodes = pointer_set_create ();
- walk_tree (&DECL_INITIAL (decl), record_reference, NULL, visited_nodes);
+ walk_tree (&DECL_INITIAL (decl), record_reference,
+ only_vars ? NULL : decl, visited_nodes);
pointer_set_destroy (visited_nodes);
}
Index: cgraph.h
===================================================================
--- cgraph.h (revision 152557)
+++ cgraph.h (working copy)
@@ -459,7 +459,7 @@ struct cgraph_node *cgraph_function_vers
bitmap);
void tree_function_versioning (tree, tree, VEC (ipa_replace_map_p,gc)*, bool,
bitmap);
struct cgraph_node *save_inline_function_body (struct cgraph_node *);
-void record_references_in_initializer (tree);
+void record_references_in_initializer (tree, bool);
bool cgraph_process_new_functions (void);
bool cgraph_decide_is_function_needed (struct cgraph_node *, tree);
Index: varasm.c
===================================================================
--- varasm.c (revision 152557)
+++ varasm.c (working copy)
@@ -2082,7 +2082,7 @@ assemble_variable (tree decl, int top_le
Without this, if the variable is placed in a
section-anchored block, the template will only be marked
when it's too late. */
- record_references_in_initializer (to);
+ record_references_in_initializer (to, false);
}
decl = to;
Index: varpool.c
===================================================================
--- varpool.c (revision 152557)
+++ varpool.c (working copy)
@@ -365,9 +365,9 @@ varpool_analyze_pending_decls (void)
already informed about increased alignment. */
align_variable (decl, 0);
- if (DECL_INITIAL (decl))
- record_references_in_initializer (decl);
}
+ if (DECL_INITIAL (decl))
+ record_references_in_initializer (decl, analyzed);
changed = true;
}
timevar_pop (TV_CGRAPH);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
` (7 preceding siblings ...)
2009-10-08 14:19 ` hubicka at ucw dot cz
@ 2009-10-08 18:59 ` meissner at gcc dot gnu dot org
2009-10-08 19:00 ` meissner at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: meissner at gcc dot gnu dot org @ 2009-10-08 18:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from meissner at gcc dot gnu dot org 2009-10-08 18:59 -------
Created an attachment (id=18754)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18754&action=view)
Patch that fixes the powerpc bootstrap problem.
This is the patch that I checked in that came from Jan Hubicka.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/41626] [4.5 Regression] GCC does not bootstrap on powerpc64
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
` (8 preceding siblings ...)
2009-10-08 18:59 ` meissner at gcc dot gnu dot org
@ 2009-10-08 19:00 ` meissner at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: meissner at gcc dot gnu dot org @ 2009-10-08 19:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from meissner at gcc dot gnu dot org 2009-10-08 19:00 -------
Patch checked into mainline, subversion id 152569.
--
meissner at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41626
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-10-08 19:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-07 21:12 [Bug bootstrap/41626] New: GCC does not bootstrap on powerpc64 meissner at gcc dot gnu dot org
2009-10-07 21:14 ` [Bug bootstrap/41626] " meissner at gcc dot gnu dot org
2009-10-07 21:16 ` [Bug bootstrap/41626] [4.5 Regression] " rguenth at gcc dot gnu dot org
2009-10-07 22:01 ` meissner at gcc dot gnu dot org
2009-10-07 22:25 ` [Bug middle-end/41626] " pinskia at gcc dot gnu dot org
2009-10-07 22:35 ` pinskia at gcc dot gnu dot org
2009-10-07 22:38 ` pinskia at gcc dot gnu dot org
2009-10-08 13:11 ` danglin at gcc dot gnu dot org
2009-10-08 14:19 ` hubicka at ucw dot cz
2009-10-08 18:59 ` meissner at gcc dot gnu dot org
2009-10-08 19:00 ` meissner at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).