public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/45957] New: [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr
@ 2010-10-09 21:59 zsojka at seznam dot cz
2010-10-09 22:17 ` [Bug tree-optimization/45957] " zsojka at seznam dot cz
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2010-10-09 21:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45957
Summary: [4.6 Regression] g++.dg/ext/fnname3.C FAILs with
-flto/-fwhopr
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
Created attachment 22010
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22010
reduced testcase
Output:
$ g++ pr45957.C
$ ./a.out && echo OK
OK
$ g++ pr45957.C -flto
$ ./a.out && echo OK
Tested revisions:
r165220 - fail
r165152 - OK
It seems __func__ evaluates to empty string in both cases (constructor and
destructor).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/45957] [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr
2010-10-09 21:59 [Bug tree-optimization/45957] New: [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr zsojka at seznam dot cz
@ 2010-10-09 22:17 ` zsojka at seznam dot cz
2010-10-09 23:21 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2010-10-09 22:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45957
--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2010-10-09 22:17:15 UTC ---
The same happens for g++.dg/template/pretty1.C and
g++.old-deja/g++.ext/pretty2.C - both fail with -flto/-fwhopr in r165220, but
not in r165152. It seems __FUNCTION__ and __PRETTY_FUNCTION__ is broken too in
constructors and destructors.
g++.old-deja/g++.ext/pretty2.C actually gives nice output:
$ g++ g++.old-deja/g++.ext/pretty2.C && ./a.out
ctor
__FUNCTION__ X
__PRETTY_FUNCTION__ X::X()
member fn
__FUNCTION__ fn
__PRETTY_FUNCTION__ void X::fn()
conversion
__FUNCTION__ operator int
__PRETTY_FUNCTION__ X::operator int()
dtor
__FUNCTION__ ~X
__PRETTY_FUNCTION__ X::~X()
$ g++ g++.old-deja/g++.ext/pretty2.C -flto && ./a.out
ctor
__FUNCTION__
__PRETTY_FUNCTION__
member fn
__FUNCTION__ fn
__PRETTY_FUNCTION__ void X::fn()
conversion
__FUNCTION__ operator int
__PRETTY_FUNCTION__ X::operator int()
dtor
__FUNCTION__
__PRETTY_FUNCTION__
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/45957] [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr
2010-10-09 21:59 [Bug tree-optimization/45957] New: [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr zsojka at seznam dot cz
2010-10-09 22:17 ` [Bug tree-optimization/45957] " zsojka at seznam dot cz
@ 2010-10-09 23:21 ` rguenth at gcc dot gnu.org
2010-10-14 15:14 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-09 23:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45957
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/45957] [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr
2010-10-09 21:59 [Bug tree-optimization/45957] New: [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr zsojka at seznam dot cz
2010-10-09 22:17 ` [Bug tree-optimization/45957] " zsojka at seznam dot cz
2010-10-09 23:21 ` rguenth at gcc dot gnu.org
@ 2010-10-14 15:14 ` rguenth at gcc dot gnu.org
2010-10-15 10:56 ` rguenth at gcc dot gnu.org
2010-10-15 10:58 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-14 15:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45957
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.10.14 15:14:34
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-14 15:14:34 UTC ---
This happens because we clear DECL_INITIAL in free-lang-data and appearantly
S::S which is the context of __func__ is DECL_ABSTRACT ...
Surely an artifact of the C++ constructor/destructor cloning.
We could simply remove
if (TREE_CODE (decl) == VAR_DECL)
{
tree context = DECL_CONTEXT (decl);
if (context)
{
enum tree_code code = TREE_CODE (context);
if (code == FUNCTION_DECL && DECL_ABSTRACT (context))
{
/* Do not clear the decl context here, that will promote
all vars to global ones. */
DECL_INITIAL (decl) = NULL_TREE;
}
}
}
from free-lang-data.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/45957] [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr
2010-10-09 21:59 [Bug tree-optimization/45957] New: [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-10-14 15:14 ` rguenth at gcc dot gnu.org
@ 2010-10-15 10:56 ` rguenth at gcc dot gnu.org
2010-10-15 10:58 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-15 10:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45957
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-15 10:56:15 UTC ---
Author: rguenth
Date: Fri Oct 15 10:56:13 2010
New Revision: 165502
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165502
Log:
2010-10-15 Richard Guenther <rguenther@suse.de>
PR lto/45957
* tree.c (free_lang_data_in_decl): Do not clear DECL_INITIAL
of vars.
* g++.dg/lto/20101014-1_0.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/lto/20101014-1_0.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/45957] [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr
2010-10-09 21:59 [Bug tree-optimization/45957] New: [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr zsojka at seznam dot cz
` (3 preceding siblings ...)
2010-10-15 10:56 ` rguenth at gcc dot gnu.org
@ 2010-10-15 10:58 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-15 10:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45957
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-15 10:58:17 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-15 10:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-09 21:59 [Bug tree-optimization/45957] New: [4.6 Regression] g++.dg/ext/fnname3.C FAILs with -flto/-fwhopr zsojka at seznam dot cz
2010-10-09 22:17 ` [Bug tree-optimization/45957] " zsojka at seznam dot cz
2010-10-09 23:21 ` rguenth at gcc dot gnu.org
2010-10-14 15:14 ` rguenth at gcc dot gnu.org
2010-10-15 10:56 ` rguenth at gcc dot gnu.org
2010-10-15 10:58 ` rguenth at gcc dot gnu.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).