public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56176] New: internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization
@ 2013-02-01 16:04 benoit.bayol at gmail dot com
2013-02-01 16:06 ` [Bug c++/56176] " benoit.bayol at gmail dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: benoit.bayol at gmail dot com @ 2013-02-01 16:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56176
Bug #: 56176
Summary: internal compiler error with call to default
constructor of inner struct having a std::function
member attribute initialization
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: benoit.bayol@gmail.com
Hello,
Here is the test code :
#include <functional>
typedef std::function<auto (int, int) -> int> fn_type;
auto f1 = [](int,int){return 0;};
struct B
{
typedef struct
{
fn_type _f = f1;
} A;
B(A a = A()){}
};
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56176] internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization
2013-02-01 16:04 [Bug c++/56176] New: internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization benoit.bayol at gmail dot com
@ 2013-02-01 16:06 ` benoit.bayol at gmail dot com
2013-02-01 16:09 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: benoit.bayol at gmail dot com @ 2013-02-01 16:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56176
--- Comment #1 from Benoit Bayol <benoit.bayol at gmail dot com> 2013-02-01 16:05:31 UTC ---
I have just noticed that the example code can be simpler :
struct B
{
typedef struct
{
int a = 0;
} A;
B(A a = A()){}
};
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56176] internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization
2013-02-01 16:04 [Bug c++/56176] New: internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization benoit.bayol at gmail dot com
2013-02-01 16:06 ` [Bug c++/56176] " benoit.bayol at gmail dot com
@ 2013-02-01 16:09 ` redi at gcc dot gnu.org
2013-02-01 16:12 ` [Bug c++/56176] ICE with call to synthesized default constructor of inner struct with NSDMI redi at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-01 16:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56176
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56176] ICE with call to synthesized default constructor of inner struct with NSDMI
2013-02-01 16:04 [Bug c++/56176] New: internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization benoit.bayol at gmail dot com
2013-02-01 16:06 ` [Bug c++/56176] " benoit.bayol at gmail dot com
2013-02-01 16:09 ` redi at gcc dot gnu.org
@ 2013-02-01 16:12 ` redi at gcc dot gnu.org
2014-05-14 15:00 ` paolo.carlini at oracle dot com
2014-05-14 15:17 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-01 16:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56176
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-02-01
Known to work| |4.8.0
Summary|internal compiler error |ICE with call to
|with call to default |synthesized default
|constructor of inner struct |constructor of inner struct
|having a std::function |with NSDMI
|member attribute |
|initialization |
Ever Confirmed|0 |1
Known to fail| |4.7.2
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-01 16:11:33 UTC ---
Trunk rejects it as invalid:
t.cc: In constructor 'constexpr B::A::A()':
t.cc:4:9: error: constructor required before non-static data member for
'B::A::a' has been parsed
{
^
t.cc: At global scope:
t.cc:7:15: note: synthesized method 'constexpr B::A::A()' first required here
B(A a = A()){}
^
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56176] ICE with call to synthesized default constructor of inner struct with NSDMI
2013-02-01 16:04 [Bug c++/56176] New: internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization benoit.bayol at gmail dot com
` (2 preceding siblings ...)
2013-02-01 16:12 ` [Bug c++/56176] ICE with call to synthesized default constructor of inner struct with NSDMI redi at gcc dot gnu.org
@ 2014-05-14 15:00 ` paolo.carlini at oracle dot com
2014-05-14 15:17 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-05-14 15:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56176
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I'm going to add the reduced testcase and close this as fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56176] ICE with call to synthesized default constructor of inner struct with NSDMI
2013-02-01 16:04 [Bug c++/56176] New: internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization benoit.bayol at gmail dot com
` (3 preceding siblings ...)
2014-05-14 15:00 ` paolo.carlini at oracle dot com
@ 2014-05-14 15:17 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-05-14 15:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56176
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
In fact we already got nsdmi-defer6.C.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-14 15:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-01 16:04 [Bug c++/56176] New: internal compiler error with call to default constructor of inner struct having a std::function member attribute initialization benoit.bayol at gmail dot com
2013-02-01 16:06 ` [Bug c++/56176] " benoit.bayol at gmail dot com
2013-02-01 16:09 ` redi at gcc dot gnu.org
2013-02-01 16:12 ` [Bug c++/56176] ICE with call to synthesized default constructor of inner struct with NSDMI redi at gcc dot gnu.org
2014-05-14 15:00 ` paolo.carlini at oracle dot com
2014-05-14 15:17 ` paolo.carlini at oracle dot com
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).