* [Bug c++/55015] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
@ 2012-10-22 2:14 ` julien.nitard at m4tp dot org
2012-10-22 5:02 ` spam_hole at shaw dot ca
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: julien.nitard at m4tp dot org @ 2012-10-22 2:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
--- Comment #1 from Julien Nitard <julien.nitard at m4tp dot org> 2012-10-22 02:13:43 UTC ---
Somebody noted in S.O. that declaring the inline function "static" (or using an
anonymous namespace which I guess as same effect) hides (or solves ;) the
problem.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
2012-10-22 2:14 ` [Bug c++/55015] " julien.nitard at m4tp dot org
@ 2012-10-22 5:02 ` spam_hole at shaw dot ca
2012-10-22 5:09 ` pinskia at gcc dot gnu.org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: spam_hole at shaw dot ca @ 2012-10-22 5:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Robert Xiao <spam_hole at shaw dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |spam_hole at shaw dot ca
--- Comment #2 from Robert Xiao <spam_hole at shaw dot ca> 2012-10-22 05:02:01 UTC ---
Minimal reproducible testcase:
typedef void (*VoidFunc)();
inline VoidFunc GetFunc() { return [](){}; }
int main() { VoidFunc func = GetFunc(); }
Compiled with gcc version 4.7.2 (MacPorts gcc47 4.7.2_2). Output:
$ g++-mp-4.7 test.cpp -std=c++11
Undefined symbols for architecture x86_64:
"GetFunc()::{lambda()#1}::_FUN()", referenced from:
GetFunc()::{lambda()#1}::operator void (*)()() const in cciEeUag.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
2012-10-22 2:14 ` [Bug c++/55015] " julien.nitard at m4tp dot org
2012-10-22 5:02 ` spam_hole at shaw dot ca
@ 2012-10-22 5:09 ` pinskia at gcc dot gnu.org
2012-11-02 11:11 ` paolo.carlini at oracle dot com
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-10-22 5:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |assemble-failure
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-22
CC| |pinskia at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-10-22 05:09:36 UTC ---
Confirmed on the trunk too.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (2 preceding siblings ...)
2012-10-22 5:09 ` pinskia at gcc dot gnu.org
@ 2012-11-02 11:11 ` paolo.carlini at oracle dot com
2012-11-26 23:38 ` [Bug c++/55015] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-02 11:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |icegood1980 at gmail dot
| |com
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-02 11:10:49 UTC ---
*** Bug 55178 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (3 preceding siblings ...)
2012-11-02 11:11 ` paolo.carlini at oracle dot com
@ 2012-11-26 23:38 ` paolo.carlini at oracle dot com
2012-11-27 10:26 ` paolo.carlini at oracle dot com
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-26 23:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Lambda functions not found |[4.7/4.8 Regression] Lambda
|at link time when declared |functions not found at link
|in an inline function |time when declared in an
| |inline function
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-26 23:37:48 UTC ---
This is a regression.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (4 preceding siblings ...)
2012-11-26 23:38 ` [Bug c++/55015] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
@ 2012-11-27 10:26 ` paolo.carlini at oracle dot com
2012-11-27 11:01 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-27 10:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-27 10:26:03 UTC ---
HJ, can you help finding which change broke this? In Comment #2 there is a very
short testcase (it's pretty old, I guess you want -std=c++0x, not -std=c++11 in
the command line)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (5 preceding siblings ...)
2012-11-27 10:26 ` paolo.carlini at oracle dot com
@ 2012-11-27 11:01 ` jakub at gcc dot gnu.org
2012-11-27 11:03 ` paolo.carlini at oracle dot com
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-27 11:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |4.8.0
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-27 11:00:54 UTC ---
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189175
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (6 preceding siblings ...)
2012-11-27 11:01 ` jakub at gcc dot gnu.org
@ 2012-11-27 11:03 ` paolo.carlini at oracle dot com
2012-11-27 11:04 ` paolo.carlini at oracle dot com
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-27 11:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-27 11:02:42 UTC ---
Never mind, it's very easy, it's the following change, the fix for PR53821:
http://gcc.gnu.org/viewcvs?view=revision&revision=189176
And PR55472 is a duplicate, reverting the above fixes it too.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (7 preceding siblings ...)
2012-11-27 11:03 ` paolo.carlini at oracle dot com
@ 2012-11-27 11:04 ` paolo.carlini at oracle dot com
2012-12-03 16:01 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-27 11:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |walker_643 at yahoo dot com
--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-27 11:03:54 UTC ---
*** Bug 55472 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (8 preceding siblings ...)
2012-11-27 11:04 ` paolo.carlini at oracle dot com
@ 2012-12-03 16:01 ` rguenth at gcc dot gnu.org
2012-12-05 22:35 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-03 16:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (9 preceding siblings ...)
2012-12-03 16:01 ` rguenth at gcc dot gnu.org
@ 2012-12-05 22:35 ` jason at gcc dot gnu.org
2012-12-06 11:32 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-05 22:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (10 preceding siblings ...)
2012-12-05 22:35 ` jason at gcc dot gnu.org
@ 2012-12-06 11:32 ` paolo.carlini at oracle dot com
2012-12-06 14:38 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-12-06 11:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |f.heckenbach@fh-soft.de
--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-12-06 11:32:25 UTC ---
*** Bug 55607 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (11 preceding siblings ...)
2012-12-06 11:32 ` paolo.carlini at oracle dot com
@ 2012-12-06 14:38 ` jason at gcc dot gnu.org
2012-12-06 14:40 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 14:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 14:37:23 UTC ---
Author: jason
Date: Thu Dec 6 14:37:13 2012
New Revision: 194251
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194251
Log:
PR c++/55015
PR c++/53821
* semantics.c (maybe_add_lambda_conv_op): Revert earlier change.
* decl.c (start_preparsed_function): Make local class methods comdat
in templates, too.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/semantics.c
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (12 preceding siblings ...)
2012-12-06 14:38 ` jason at gcc dot gnu.org
@ 2012-12-06 14:40 ` jason at gcc dot gnu.org
2012-12-06 14:43 ` jason at gcc dot gnu.org
2012-12-06 15:45 ` paolo.carlini at oracle dot com
15 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 14:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 14:39:57 UTC ---
Author: jason
Date: Thu Dec 6 14:39:52 2012
New Revision: 194253
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194253
Log:
PR c++/55015
PR c++/53821
* semantics.c (maybe_add_lambda_conv_op): Revert earlier change.
* decl.c (start_preparsed_function): Make local class methods comdat
in templates, too.
Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/decl.c
branches/gcc-4_7-branch/gcc/cp/semantics.c
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (13 preceding siblings ...)
2012-12-06 14:40 ` jason at gcc dot gnu.org
@ 2012-12-06 14:43 ` jason at gcc dot gnu.org
2012-12-06 15:45 ` paolo.carlini at oracle dot com
15 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 14:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.8.0 |4.7.3
--- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 14:42:45 UTC ---
Fixed for 4.7.3.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/55015] [4.7/4.8 Regression] Lambda functions not found at link time when declared in an inline function
2012-10-22 2:10 [Bug c++/55015] New: Lambda functions not found at link time when declared in an inline function julien.nitard at m4tp dot org
` (14 preceding siblings ...)
2012-12-06 14:43 ` jason at gcc dot gnu.org
@ 2012-12-06 15:45 ` paolo.carlini at oracle dot com
15 siblings, 0 replies; 17+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-12-06 15:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matt at godbolt dot org
--- Comment #14 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-12-06 15:44:50 UTC ---
*** Bug 54801 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 17+ messages in thread