aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-02-15 15:29:08 -0500
committerJason Merrill <jason@gcc.gnu.org>2017-02-15 15:29:08 -0500
commit19e8a45feb6c8cda4bc324e8bd6434ca46033b7c (patch)
tree753e105ddd16894c23f726f7d2c1b39362e4d4df /gcc/cp/method.c
parent945c17d8c1fd5e2299fb17becac9b35ec45db3e6 (diff)
downloadgcc-19e8a45feb6c8cda4bc324e8bd6434ca46033b7c.zip
gcc-19e8a45feb6c8cda4bc324e8bd6434ca46033b7c.tar.gz
gcc-19e8a45feb6c8cda4bc324e8bd6434ca46033b7c.tar.bz2
PR c++/79464 - ICE in IPA with omitted constructor parms
* class.c (build_clone): Also omit parms from TYPE_ARG_TYPES. (adjust_clone_args): Adjust. (add_method): Remember omitted parms. * call.c (add_function_candidate): Likewise. * mangle.c (write_method_parms): Likewise. * method.c (ctor_omit_inherited_parms): Return false if there are no parms to omit. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r245495
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index a6a9b4e..beb0a24 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -575,6 +575,9 @@ ctor_omit_inherited_parms (tree fn)
if (!DECL_BASE_CONSTRUCTOR_P (fn)
|| !CLASSTYPE_VBASECLASSES (DECL_CONTEXT (fn)))
return false;
+ if (FUNCTION_FIRST_USER_PARMTYPE (DECL_ORIGIN (fn)) == void_list_node)
+ /* No user-declared parameters to omit. */
+ return false;
tree binfo = inherited_ctor_binfo (fn);
for (; binfo; binfo = BINFO_INHERITANCE_CHAIN (binfo))
if (BINFO_VIRTUAL_P (binfo))