From: Jakub Jelinek Date: Wed, 20 Dec 2017 09:12:09 +0000 (+0100) Subject: re PR c++/83490 (ICE in find_call_stack_args, at dce.c:392) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b8b4a883d74dc74ecf64643e7d3a060db489318;p=gcc.git re PR c++/83490 (ICE in find_call_stack_args, at dce.c:392) PR c++/83490 * calls.c (compute_argument_addresses): Ignore TYPE_EMPTY_P arguments. * g++.dg/abi/empty29.C: New test. From-SVN: r255852 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c90777035d0..9c22fd74637 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-12-20 Jakub Jelinek + + PR c++/83490 + * calls.c (compute_argument_addresses): Ignore TYPE_EMPTY_P arguments. + 2017-12-20 Julia Koval * common/config/i386/i386-common.c (OPTION_MASK_ISA_VPCLMULQDQ_SET, diff --git a/gcc/calls.c b/gcc/calls.c index 6057aa65da0..166c152e19b 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2365,6 +2365,9 @@ compute_argument_addresses (struct arg_data *args, rtx argblock, int num_actuals && args[i].partial == 0) continue; + if (TYPE_EMPTY_P (TREE_TYPE (args[i].tree_value))) + continue; + /* Pointer Bounds are never passed on the stack. */ if (POINTER_BOUNDS_P (args[i].tree_value)) continue; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 50bd37b3166..41ec29e4592 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-12-20 Jakub Jelinek + + PR c++/83490 + * g++.dg/abi/empty29.C: New test. + 2017-12-20 Martin Liska PR middle-end/82404 diff --git a/gcc/testsuite/g++.dg/abi/empty29.C b/gcc/testsuite/g++.dg/abi/empty29.C new file mode 100644 index 00000000000..92fa88674e8 --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/empty29.C @@ -0,0 +1,7 @@ +// PR c++/83490 +// { dg-do compile { target i?86-*-* x86_64-*-* } } +// { dg-options "-fipa-icf-functions -Og -maccumulate-outgoing-args" } + +struct A {}; +A operator < (A, A) { return A (); } +A operator > (A, A) { return A (); }