PR c++/79050 - ICE with undeduced auto and LTO
* decl.c (poplevel): Remove undeduced auto decls. From-SVN: r245510
This commit is contained in:
parent
31927af6c7
commit
61cee26030
|
@ -1,3 +1,8 @@
|
|||
2017-02-16 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/79050 - ICE with undeduced auto and LTO
|
||||
* decl.c (poplevel): Remove undeduced auto decls.
|
||||
|
||||
2017-02-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/79512
|
||||
|
|
|
@ -792,14 +792,17 @@ poplevel (int keep, int reverse, int functionbody)
|
|||
back ends won't understand OVERLOAD, so we remove them here.
|
||||
Because the BLOCK_VARS are (temporarily) shared with
|
||||
CURRENT_BINDING_LEVEL->NAMES we must do this fixup after we have
|
||||
popped all the bindings. */
|
||||
popped all the bindings. Also remove undeduced 'auto' decls,
|
||||
which LTO doesn't understand, and can't have been used by anything. */
|
||||
if (block)
|
||||
{
|
||||
tree* d;
|
||||
|
||||
for (d = &BLOCK_VARS (block); *d; )
|
||||
{
|
||||
if (TREE_CODE (*d) == TREE_LIST)
|
||||
if (TREE_CODE (*d) == TREE_LIST
|
||||
|| (!processing_template_decl
|
||||
&& undeduced_auto_decl (*d)))
|
||||
*d = TREE_CHAIN (*d);
|
||||
else
|
||||
d = &DECL_CHAIN (*d);
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// PR c++/79050
|
||||
// { dg-lto-do assemble }
|
||||
|
||||
int main ()
|
||||
{
|
||||
auto foo ();
|
||||
}
|
Loading…
Reference in New Issue