* [Bug c++/56614] [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0'
2013-03-13 14:46 [Bug c++/56614] New: [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0' redi at gcc dot gnu.org
@ 2013-03-13 16:48 ` paolo.carlini at oracle dot com
2013-03-13 17:29 ` paolo.carlini at oracle dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-13 16:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56614
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-03-13
Target Milestone|--- |4.7.3
Ever Confirmed|0 |1
Known to fail| |4.7.0
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-13 16:47:56 UTC ---
Confirmed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/56614] [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0'
2013-03-13 14:46 [Bug c++/56614] New: [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0' redi at gcc dot gnu.org
2013-03-13 16:48 ` [Bug c++/56614] " paolo.carlini at oracle dot com
@ 2013-03-13 17:29 ` paolo.carlini at oracle dot com
2013-03-13 17:37 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-03-13 17:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56614
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-03-13 17:29:02 UTC ---
A few details can be removed from the testcase:
#include <initializer_list>
struct vector
{
vector(std::initializer_list<int>);
};
void func();
struct C
{
template<typename T>
C(T, vector = vector({}));
};
C c(func);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/56614] [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0'
2013-03-13 14:46 [Bug c++/56614] New: [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0' redi at gcc dot gnu.org
2013-03-13 16:48 ` [Bug c++/56614] " paolo.carlini at oracle dot com
2013-03-13 17:29 ` paolo.carlini at oracle dot com
@ 2013-03-13 17:37 ` redi at gcc dot gnu.org
2013-03-14 10:22 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-13 17:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56614
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-13 17:36:27 UTC ---
Ah, thanks. I reduced it from 300KLOC and apparently stopped too soon :)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/56614] [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0'
2013-03-13 14:46 [Bug c++/56614] New: [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0' redi at gcc dot gnu.org
` (2 preceding siblings ...)
2013-03-13 17:37 ` redi at gcc dot gnu.org
@ 2013-03-14 10:22 ` jakub at gcc dot gnu.org
2013-03-14 13:09 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-14 10:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56614
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |jason at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-14 10:21:05 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184199
aka PR39055. If the testcase is valid, perhaps we need to special case the
std::initializer_list temporaries, or allow DECL_ARTIFICIAL except for this?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/56614] [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0'
2013-03-13 14:46 [Bug c++/56614] New: [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0' redi at gcc dot gnu.org
` (3 preceding siblings ...)
2013-03-14 10:22 ` jakub at gcc dot gnu.org
@ 2013-03-14 13:09 ` jason at gcc dot gnu.org
2013-03-14 17:35 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-14 13:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56614
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-14 13:09:20 UTC ---
Author: jason
Date: Thu Mar 14 13:09:11 2013
New Revision: 196658
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196658
Log:
PR c++/56614
* decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist-defarg1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/56614] [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0'
2013-03-13 14:46 [Bug c++/56614] New: [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0' redi at gcc dot gnu.org
` (4 preceding siblings ...)
2013-03-14 13:09 ` jason at gcc dot gnu.org
@ 2013-03-14 17:35 ` jason at gcc dot gnu.org
2013-03-14 17:36 ` jason at gcc dot gnu.org
2013-03-14 17:46 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-14 17:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56614
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-14 17:35:03 UTC ---
Author: jason
Date: Thu Mar 14 17:34:55 2013
New Revision: 196662
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196662
Log:
PR c++/56614
* decl.c (local_variable_p_walkfn): Check DECL_ARTIFICIAL again.
Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/initlist-defarg1.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/decl.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/56614] [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0'
2013-03-13 14:46 [Bug c++/56614] New: [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0' redi at gcc dot gnu.org
` (5 preceding siblings ...)
2013-03-14 17:35 ` jason at gcc dot gnu.org
@ 2013-03-14 17:36 ` jason at gcc dot gnu.org
2013-03-14 17:46 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-14 17:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56614
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-14 17:35:53 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/56614] [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0'
2013-03-13 14:46 [Bug c++/56614] New: [4.7/4.8 Regression] error: default argument 'std::vector<E>(std::initializer_list<E>{((const E*)(& ._0)), 1u}, (*(const std::allocator<E>*)(& std::allocator<E>())))' uses local variable '._0' redi at gcc dot gnu.org
` (6 preceding siblings ...)
2013-03-14 17:36 ` jason at gcc dot gnu.org
@ 2013-03-14 17:46 ` redi at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-14 17:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56614
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-14 17:45:58 UTC ---
Thanks, Jason
^ permalink raw reply [flat|nested] 9+ messages in thread