public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
@ 2007-02-04 17:50 tbm at cyrius dot com
2007-02-04 18:02 ` [Bug middle-end/30700] " rguenth at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: tbm at cyrius dot com @ 2007-02-04 17:50 UTC (permalink / raw)
To: gcc-bugs
PR27657 addressed a similar problem but this one is slightly different and
remains unsolved:
(sid)1556:tbm@em64t: ~/src/a] cat test.c
static void sand_window_create_shape (int test) {}
static void (* const b) (int test) = sand_window_create_shape;
(sid)1557:tbm@em64t: ~/src/a] cat main.c
int main() {
}
(sid)1558:tbm@em64t: ~/src/a] make
/usr/lib/gcc-snapshot/bin/gcc -c -o main.o main.c
/usr/lib/gcc-snapshot/bin/gcc -c -g -O -o test.o test.c
/usr/lib/gcc-snapshot/bin/gcc main.o test.o
test.o:(.debug_info+0x49): undefined reference to `sand_window_create_shape'
collect2: ld returned 1 exit status
make: *** [all] Error 1
--
Summary: [4.2 Regression] YA bogus undefined reference error to
static func with -g and -O
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tbm at cyrius dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
@ 2007-02-04 18:02 ` rguenth at gcc dot gnu dot org
2007-02-09 22:25 ` [Bug middle-end/30700] [4.2/4.3 " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-02-04 18:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-02-04 18:02 -------
Index: dwarf2out.c
===================================================================
*** dwarf2out.c (revision 121576)
--- dwarf2out.c (working copy)
*************** reference_to_unused (tree * tp, int * wa
*** 10007,10012 ****
--- 10007,10018 ----
if (!node->needed)
return *tp;
}
+ else if (DECL_P (*tp) && TREE_CODE (*tp) == FUNCTION_DECL)
+ {
+ struct cgraph_node *node = cgraph_node (*tp);
+ if (!node->needed)
+ return *tp;
+ }
return NULL_TREE;
}
honza - does this look sane and can we maybe do this whole function in
graph ways?
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-02-04 18:02:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2/4.3 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
2007-02-04 18:02 ` [Bug middle-end/30700] " rguenth at gcc dot gnu dot org
@ 2007-02-09 22:25 ` pinskia at gcc dot gnu dot org
2007-02-19 21:04 ` mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-09 22:25 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2/4.3 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
2007-02-04 18:02 ` [Bug middle-end/30700] " rguenth at gcc dot gnu dot org
2007-02-09 22:25 ` [Bug middle-end/30700] [4.2/4.3 " pinskia at gcc dot gnu dot org
@ 2007-02-19 21:04 ` mmitchel at gcc dot gnu dot org
2007-04-04 11:46 ` [Bug middle-end/30700] [4.2 " rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-19 21:04 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
` (2 preceding siblings ...)
2007-02-19 21:04 ` mmitchel at gcc dot gnu dot org
@ 2007-04-04 11:46 ` rguenth at gcc dot gnu dot org
2007-04-11 14:05 ` howarth at nitro dot med dot uc dot edu
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-04-04 11:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-04-04 12:46 -------
Fixed on the mainline by
Author: hubicka
Date: Fri Mar 30 09:03:55 2007
New Revision: 123358
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123358
Log:
PR middle-end/PR30700
* dwarf2out.c (reference_to_unused): Ask cgraph for functions
availablility; add more sanity checking; ask varpool only about
VAR_DECL.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|4.1.1 4.1.2 |4.1.1 4.1.2 4.3.0
Summary|[4.2/4.3 Regression] YA |[4.2 Regression] YA bogus
|bogus undefined reference |undefined reference error to
|error to static func with -g|static func with -g and -O
|and -O |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
` (3 preceding siblings ...)
2007-04-04 11:46 ` [Bug middle-end/30700] [4.2 " rguenth at gcc dot gnu dot org
@ 2007-04-11 14:05 ` howarth at nitro dot med dot uc dot edu
2007-04-12 6:24 ` tbm at cyrius dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2007-04-11 14:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from howarth at nitro dot med dot uc dot edu 2007-04-11 15:05 -------
I'm puzzled why the fix for this PR was checked into mainline instead of gcc
4.2 branch since only gcc 4.2 is marked as known to fail.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
` (4 preceding siblings ...)
2007-04-11 14:05 ` howarth at nitro dot med dot uc dot edu
@ 2007-04-12 6:24 ` tbm at cyrius dot com
2007-04-12 16:58 ` howarth at nitro dot med dot uc dot edu
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tbm at cyrius dot com @ 2007-04-12 6:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tbm at cyrius dot com 2007-04-12 07:24 -------
If you click on "View Bug Activity" you'll see that the bug used to be marked
as 4.2/4.3. Richi changed it to 4.2 only when the patch got committed to
mainline.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
` (5 preceding siblings ...)
2007-04-12 6:24 ` tbm at cyrius dot com
@ 2007-04-12 16:58 ` howarth at nitro dot med dot uc dot edu
2007-04-12 21:41 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2007-04-12 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from howarth at nitro dot med dot uc dot edu 2007-04-12 17:58 -------
Does that mean that the patch for mainline wouldn't work on gcc 4.2 branch or
that the patch just hasn't been applied to gcc 4.2 branch yet?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
` (6 preceding siblings ...)
2007-04-12 16:58 ` howarth at nitro dot med dot uc dot edu
@ 2007-04-12 21:41 ` rguenth at gcc dot gnu dot org
2007-04-17 18:02 ` hubicka at gcc dot gnu dot org
2007-04-17 18:05 ` hubicka at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-04-12 21:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2007-04-12 22:41 -------
The latter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
` (7 preceding siblings ...)
2007-04-12 21:41 ` rguenth at gcc dot gnu dot org
@ 2007-04-17 18:02 ` hubicka at gcc dot gnu dot org
2007-04-17 18:05 ` hubicka at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2007-04-17 18:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hubicka at gcc dot gnu dot org 2007-04-17 19:02 -------
Subject: Bug 30700
Author: hubicka
Date: Tue Apr 17 19:02:09 2007
New Revision: 123922
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123922
Log:
PR middle-end/30700
* dwarf2out.c (reference_to_unused): Ask cgraph for functions
availablility; add more sanity checking; ask varpool only about
VAR_DECL.
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/dwarf2out.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/30700] [4.2 Regression] YA bogus undefined reference error to static func with -g and -O
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
` (8 preceding siblings ...)
2007-04-17 18:02 ` hubicka at gcc dot gnu dot org
@ 2007-04-17 18:05 ` hubicka at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2007-04-17 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hubicka at gcc dot gnu dot org 2007-04-17 19:04 -------
Fixed.
--
hubicka at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30700
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-04-17 18:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-04 17:50 [Bug middle-end/30700] New: [4.2 Regression] YA bogus undefined reference error to static func with -g and -O tbm at cyrius dot com
2007-02-04 18:02 ` [Bug middle-end/30700] " rguenth at gcc dot gnu dot org
2007-02-09 22:25 ` [Bug middle-end/30700] [4.2/4.3 " pinskia at gcc dot gnu dot org
2007-02-19 21:04 ` mmitchel at gcc dot gnu dot org
2007-04-04 11:46 ` [Bug middle-end/30700] [4.2 " rguenth at gcc dot gnu dot org
2007-04-11 14:05 ` howarth at nitro dot med dot uc dot edu
2007-04-12 6:24 ` tbm at cyrius dot com
2007-04-12 16:58 ` howarth at nitro dot med dot uc dot edu
2007-04-12 21:41 ` rguenth at gcc dot gnu dot org
2007-04-17 18:02 ` hubicka at gcc dot gnu dot org
2007-04-17 18:05 ` hubicka 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).