re PR c++/56177 (ICE when used forward for 'auto f();')
PR c++/56177 * decl.c (start_preparsed_function): Update restype if we change decl1. From-SVN: r195780
This commit is contained in:
parent
29ef6cd035
commit
a283c40761
@ -1,5 +1,9 @@
|
||||
2013-02-05 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/56177
|
||||
* decl.c (start_preparsed_function): Update restype if we change
|
||||
decl1.
|
||||
|
||||
PR c++/56208
|
||||
* pt.c (fn_type_unification): Discard any access checks from
|
||||
substituting explicit args.
|
||||
|
@ -13116,6 +13116,7 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
|
||||
DECL_CONTEXT (decl1) = DECL_CONTEXT (DECL_TI_TEMPLATE (decl1));
|
||||
}
|
||||
fntype = TREE_TYPE (decl1);
|
||||
restype = TREE_TYPE (fntype);
|
||||
|
||||
/* If #pragma weak applies, mark the decl appropriately now.
|
||||
The pragma only applies to global functions. Because
|
||||
|
5
gcc/testsuite/g++.dg/cpp1y/auto-fn14.C
Normal file
5
gcc/testsuite/g++.dg/cpp1y/auto-fn14.C
Normal file
@ -0,0 +1,5 @@
|
||||
// PR c++/56177
|
||||
// { dg-options "-std=c++1y" }
|
||||
|
||||
auto f ();
|
||||
auto f () { return 33; }
|
Loading…
Reference in New Issue
Block a user