public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
@ 2005-10-10 10:47 rguenth at gcc dot gnu dot org
2005-10-10 12:08 ` [Bug middle-end/24295] " pinskia at gcc dot gnu dot org
` (24 more replies)
0 siblings, 25 replies; 26+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-10 10:47 UTC (permalink / raw)
To: gcc-bugs
Consider
static const double foo_local = 1.0;
#pragma weak foo = foo_local
with unit-at-a-time we get rid of the foo_local variable (because it is unused
apart form the weak decl). This is a regression from 4.0 where we correctly
mark foo_local as referenced.
This breaks building Xorg. rth fixed it for 4.0, somehow the bug came back.
--
Summary: [4.1 Regression] #pragma weak foo = bar no longer
causes bar to be referenced
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
@ 2005-10-10 12:08 ` pinskia at gcc dot gnu dot org
2005-10-10 12:18 ` pinskia at gcc dot gnu dot org
` (23 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 12:08 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
2005-10-10 12:08 ` [Bug middle-end/24295] " pinskia at gcc dot gnu dot org
@ 2005-10-10 12:18 ` pinskia at gcc dot gnu dot org
2005-10-10 12:19 ` rguenth at gcc dot gnu dot org
` (22 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 12:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-10 12:18 -------
Confirmed, be failing since at least 20050827.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.1.0
Known to work| |4.0.3
Last reconfirmed|0000-00-00 00:00:00 |2005-10-10 12:18:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
2005-10-10 12:08 ` [Bug middle-end/24295] " pinskia at gcc dot gnu dot org
2005-10-10 12:18 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 12:19 ` rguenth at gcc dot gnu dot org
2005-10-10 13:55 ` pinskia at gcc dot gnu dot org
` (21 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-10 12:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2005-10-10 12:19 -------
See PR19031 where this problem was fixed for 4.0.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-10-10 12:19 ` rguenth at gcc dot gnu dot org
@ 2005-10-10 13:55 ` pinskia at gcc dot gnu dot org
2005-10-10 14:11 ` pinskia at gcc dot gnu dot org
` (20 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 13:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-10 13:55 -------
Failing started before 20050801.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-10-10 13:55 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 14:11 ` pinskia at gcc dot gnu dot org
2005-10-10 14:32 ` pinskia at gcc dot gnu dot org
` (19 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 14:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-10-10 14:11 -------
And has been failing since 20050701.
Maybe we need a machine which just builds a distro over and over. I know Apple
has a such a beast for Mac OS X.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-10-10 14:11 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 14:32 ` pinskia at gcc dot gnu dot org
2005-10-10 14:43 ` pinskia at gcc dot gnu dot org
` (18 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 14:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-10-10 14:32 -------
Happens in 20050601 also.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-10-10 14:32 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 14:43 ` pinskia at gcc dot gnu dot org
2005-10-10 14:57 ` pinskia at gcc dot gnu dot org
` (17 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 14:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-10-10 14:43 -------
Happens also in 20050501.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-10-10 14:43 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 14:57 ` pinskia at gcc dot gnu dot org
2005-10-10 15:08 ` pinskia at gcc dot gnu dot org
` (16 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 14:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2005-10-10 14:57 -------
Fails with 20050401 also.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-10-10 14:57 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 15:08 ` pinskia at gcc dot gnu dot org
2005-10-10 15:15 ` pinskia at gcc dot gnu dot org
` (15 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 15:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2005-10-10 15:08 -------
Works in 20050320.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-10-10 15:08 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 15:15 ` pinskia at gcc dot gnu dot org
2005-10-10 15:27 ` pinskia at gcc dot gnu dot org
` (14 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2005-10-10 15:15 -------
CCing Honza since the tree profiling branch merge happened during that time.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-10-10 15:15 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 15:27 ` pinskia at gcc dot gnu dot org
2005-10-10 15:37 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 15:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pinskia at gcc dot gnu dot org 2005-10-10 15:27 -------
Works with 20050321.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (11 preceding siblings ...)
2005-10-10 15:37 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 15:37 ` pinskia at gcc dot gnu dot org
2005-10-10 15:50 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 15:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at gcc dot gnu dot org 2005-10-10 15:37 -------
Works on 20050325.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-10-10 15:27 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 15:37 ` pinskia at gcc dot gnu dot org
2005-10-10 15:37 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 15:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2005-10-10 15:37 -------
(In reply to comment #11)
> Works on 20050325.
The top of the changelog at this time is:
2005-03-24 Kazu Hirata <kazu@cs.umass.edu>
* emit-rtl.c (reverse_comparison): Remove.
* rtl.h: Remove the corresponding prototype.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (12 preceding siblings ...)
2005-10-10 15:37 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 15:50 ` pinskia at gcc dot gnu dot org
2005-10-10 15:52 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 15:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from pinskia at gcc dot gnu dot org 2005-10-10 15:50 -------
Works with 20050328.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (13 preceding siblings ...)
2005-10-10 15:50 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 15:52 ` pinskia at gcc dot gnu dot org
2005-10-10 15:57 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 15:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from pinskia at gcc dot gnu dot org 2005-10-10 15:52 -------
(In reply to comment #13)
> Works with 20050328.
Note the top of the changelog is:
2005-03-27 Steven Bosscher <stevenb@suse.de>
* vax-protos.h (vax_output_int_move, vax_output_int_add,
vax_output_conditional_branch): New prototypes.
I don't think this was caused by the merge of the tree-profiling after all.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (14 preceding siblings ...)
2005-10-10 15:52 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 15:57 ` pinskia at gcc dot gnu dot org
2005-10-10 23:31 ` janis at gcc dot gnu dot org
` (8 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 15:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from pinskia at gcc dot gnu dot org 2005-10-10 15:57 -------
I am starting to think the following patch caused it:
-2005-03-29 Jakub Jelinek <jakub@redhat.com>
-
- PR middle-end/20622
- * cgraph.h (struct cgraph_varpool_node): Add alias field.
- * cgraph.c (cgraph_varpool_assemble_pending_decls): Don't call
- assemble_variable on aliases.
- * varasm.c (assemble_alias): Set node->alias.
- * toplev.c (wrapup_global_declarations): Don't call
- rest_of_decl_compilation on aliases again.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (15 preceding siblings ...)
2005-10-10 15:57 ` pinskia at gcc dot gnu dot org
@ 2005-10-10 23:31 ` janis at gcc dot gnu dot org
2005-10-16 21:45 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: janis at gcc dot gnu dot org @ 2005-10-10 23:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from janis at gcc dot gnu dot org 2005-10-10 23:31 -------
A regression hunt identified this patch from hubicka on 2005-03-30:
http://gcc.gnu.org/ml/gcc-cvs/2005-03/msg01487.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (16 preceding siblings ...)
2005-10-10 23:31 ` janis at gcc dot gnu dot org
@ 2005-10-16 21:45 ` pinskia at gcc dot gnu dot org
2005-10-18 22:24 ` [Bug middle-end/24295] [4.1 Regression] Xorg broken, " steven at gcc dot gnu dot org
` (6 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-16 21:45 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] Xorg broken, #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (17 preceding siblings ...)
2005-10-16 21:45 ` pinskia at gcc dot gnu dot org
@ 2005-10-18 22:24 ` steven at gcc dot gnu dot org
2005-10-19 9:31 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-10-18 22:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from steven at gcc dot gnu dot org 2005-10-18 22:24 -------
We want to cgraph_varpool_mark_needed_node the rhs of the #pragma weak, but by
the time we get to maybe_apply_pending_pragma_weaks, we only have the
identifier, and AFAICT no way to find the appropriate symbol that we want to
mark as needed.
Here, I've just made the pragma handler force the rhs of the #pragma weak into
the assembler file. Without force_output, the "unreferenced" rhs will still be
dropped from the cgraph by cgraph_varpool_remove_unreferenced_decls, and there
is no way to tell from there that this variable is needed, other than forcing
it to be written out. This is a hack, but the way we find out about necessary
nodes is so complicated that I don't fully understand how this is supposed to
be fixed.
I think fixing this completely requires that we keep a list of DECLs instead of
IDENTIFIER_NODEs for the pending #pragma weak list, so that we can mark the
DECL of pending pragmas from maybe_apply_pragma_weak. Or maybe there is
another way to get the DECL for alias_id there?
Index: c-pragma.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-pragma.c,v
retrieving revision 1.91
diff -u -3 -p -r1.91 c-pragma.c
--- c-pragma.c 19 Jul 2005 20:19:12 -0000 1.91
+++ c-pragma.c 18 Oct 2005 22:23:57 -0000
@@ -36,6 +36,7 @@ Software Foundation, 51 Franklin Street,
#include "tm_p.h"
#include "vec.h"
#include "target.h"
+#include "cgraph.h"
#define GCC_BAD(gmsgid) \
do { warning (OPT_Wpragmas, gmsgid); return; } while (0)
@@ -310,7 +311,7 @@ maybe_apply_pending_pragma_weaks (void)
alias_id = TREE_PURPOSE (t);
id = TREE_VALUE (t);
- if (TREE_VALUE (t) == NULL)
+ if (id == NULL)
continue;
decl = build_decl (FUNCTION_DECL, alias_id, default_function_type);
@@ -330,6 +331,7 @@ handle_pragma_weak (cpp_reader * ARG_UNU
{
tree name, value, x, decl;
enum cpp_ttype t;
+ struct cgraph_varpool_node *node;
value = 0;
@@ -354,6 +356,15 @@ handle_pragma_weak (cpp_reader * ARG_UNU
}
else
pending_weaks = tree_cons (name, value, pending_weaks);
+
+ decl = identifier_global_value (value);
+ if (decl && DECL_P (decl))
+ {
+ /* Force DECL into the assembler output no matter what. */
+ node = cgraph_varpool_node (decl);
+ cgraph_varpool_mark_needed_node (node);
+ node->force_output = true;
+ }
}
#else
void
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jsm28 at gcc dot gnu dot org
Last reconfirmed|2005-10-10 12:18:19 |2005-10-18 22:24:55
date| |
Summary|[4.1 Regression] #pragma |[4.1 Regression] Xorg
|weak foo = bar no longer |broken, #pragma weak foo =
|causes bar to be referenced |bar no longer causes bar to
| |be referenced
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] Xorg broken, #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (18 preceding siblings ...)
2005-10-18 22:24 ` [Bug middle-end/24295] [4.1 Regression] Xorg broken, " steven at gcc dot gnu dot org
@ 2005-10-19 9:31 ` rguenth at gcc dot gnu dot org
2005-10-19 9:32 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-19 9:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from rguenth at gcc dot gnu dot org 2005-10-19 09:31 -------
+ decl = identifier_global_value (value);
Make that
+ decl = decl ? identifier_global_value (value) : NULL_TREE;
and it even survives bootstrap.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] Xorg broken, #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (19 preceding siblings ...)
2005-10-19 9:31 ` rguenth at gcc dot gnu dot org
@ 2005-10-19 9:32 ` rguenth at gcc dot gnu dot org
2005-10-20 18:35 ` aoliva at gcc dot gnu dot org
` (3 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-19 9:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from rguenth at gcc dot gnu dot org 2005-10-19 09:32 -------
err, s/decl/value/ of course.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] Xorg broken, #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (20 preceding siblings ...)
2005-10-19 9:32 ` rguenth at gcc dot gnu dot org
@ 2005-10-20 18:35 ` aoliva at gcc dot gnu dot org
2005-10-20 19:30 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2005-10-20 18:35 UTC (permalink / raw)
To: gcc-bugs
--
aoliva at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |aoliva at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-10-18 22:24:55 |2005-10-20 18:35:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] Xorg broken, #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (21 preceding siblings ...)
2005-10-20 18:35 ` aoliva at gcc dot gnu dot org
@ 2005-10-20 19:30 ` cvs-commit at gcc dot gnu dot org
2005-10-20 19:32 ` aoliva at gcc dot gnu dot org
2005-10-25 18:59 ` cvs-commit at gcc dot gnu dot org
24 siblings, 0 replies; 26+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-20 19:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from cvs-commit at gcc dot gnu dot org 2005-10-20 19:30 -------
Subject: Bug 24295
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: aoliva@gcc.gnu.org 2005-10-20 19:30:23
Modified files:
gcc/testsuite : ChangeLog
gcc : ChangeLog cgraphunit.c varasm.c
gcc/testsuite/g++.old-deja/g++.abi: vtable2.C
Added files:
gcc/testsuite/gcc.dg: attr-alias-3.c
gcc/testsuite/gcc.dg/weak: weak-14.c
Log message:
gcc/ChangeLog:
PR middle-end/24295
* cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Mark
alias targets.
* varasm.c (find_decl_and_mark_needed): After cgraph global info
is ready, stop marking functions, but still mark variables.
gcc/testsuite/ChangeLog:
PR middle-end/24295
* g++.old-deja/g++.abi/vtable2.C: Do not introduce external
declarations with the same names as thunks' alias targets, use
aliases instead.
* gcc.dg/attr-alias-3.c: New test.
* gcc.dg/weak/weak-14.c, gcc.dg/weak/weak-14a.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6219&r2=1.6220
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10193&r2=2.10194
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cgraphunit.c.diff?cvsroot=gcc&r1=1.129&r2=1.130
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&r1=1.533&r2=1.534
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.abi/vtable2.C.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/attr-alias-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/weak/weak-14.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] Xorg broken, #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (22 preceding siblings ...)
2005-10-20 19:30 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-20 19:32 ` aoliva at gcc dot gnu dot org
2005-10-25 18:59 ` cvs-commit at gcc dot gnu dot org
24 siblings, 0 replies; 26+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2005-10-20 19:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from aoliva at gcc dot gnu dot org 2005-10-20 19:32 -------
Fixed.
--
aoliva at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
* [Bug middle-end/24295] [4.1 Regression] Xorg broken, #pragma weak foo = bar no longer causes bar to be referenced
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
` (23 preceding siblings ...)
2005-10-20 19:32 ` aoliva at gcc dot gnu dot org
@ 2005-10-25 18:59 ` cvs-commit at gcc dot gnu dot org
24 siblings, 0 replies; 26+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-25 18:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from cvs-commit at gcc dot gnu dot org 2005-10-25 18:59 -------
Subject: Bug 24295
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: aoliva@gcc.gnu.org 2005-10-25 18:59:21
Modified files:
gcc/testsuite : ChangeLog
gcc/testsuite/g++.old-deja/g++.abi: vtable2.C
Log message:
PR middle-end/24295, PR testsuite/24477
* g++.old-deja/g++.abi/vtable2.C: Require alias for now. Will be
removed when weakref hits the tree.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6252&r2=1.6253
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.abi/vtable2.C.diff?cvsroot=gcc&r1=1.8&r2=1.9
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24295
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2005-10-25 18:59 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-10 10:47 [Bug middle-end/24295] New: [4.1 Regression] #pragma weak foo = bar no longer causes bar to be referenced rguenth at gcc dot gnu dot org
2005-10-10 12:08 ` [Bug middle-end/24295] " pinskia at gcc dot gnu dot org
2005-10-10 12:18 ` pinskia at gcc dot gnu dot org
2005-10-10 12:19 ` rguenth at gcc dot gnu dot org
2005-10-10 13:55 ` pinskia at gcc dot gnu dot org
2005-10-10 14:11 ` pinskia at gcc dot gnu dot org
2005-10-10 14:32 ` pinskia at gcc dot gnu dot org
2005-10-10 14:43 ` pinskia at gcc dot gnu dot org
2005-10-10 14:57 ` pinskia at gcc dot gnu dot org
2005-10-10 15:08 ` pinskia at gcc dot gnu dot org
2005-10-10 15:15 ` pinskia at gcc dot gnu dot org
2005-10-10 15:27 ` pinskia at gcc dot gnu dot org
2005-10-10 15:37 ` pinskia at gcc dot gnu dot org
2005-10-10 15:37 ` pinskia at gcc dot gnu dot org
2005-10-10 15:50 ` pinskia at gcc dot gnu dot org
2005-10-10 15:52 ` pinskia at gcc dot gnu dot org
2005-10-10 15:57 ` pinskia at gcc dot gnu dot org
2005-10-10 23:31 ` janis at gcc dot gnu dot org
2005-10-16 21:45 ` pinskia at gcc dot gnu dot org
2005-10-18 22:24 ` [Bug middle-end/24295] [4.1 Regression] Xorg broken, " steven at gcc dot gnu dot org
2005-10-19 9:31 ` rguenth at gcc dot gnu dot org
2005-10-19 9:32 ` rguenth at gcc dot gnu dot org
2005-10-20 18:35 ` aoliva at gcc dot gnu dot org
2005-10-20 19:30 ` cvs-commit at gcc dot gnu dot org
2005-10-20 19:32 ` aoliva at gcc dot gnu dot org
2005-10-25 18:59 ` cvs-commit 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).