diff options
author | Jason Merrill <jason@redhat.com> | 2017-12-06 17:31:47 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2017-12-06 17:31:47 -0500 |
commit | c25ac92773ac357a9dfb831ded2e071f04ec7735 (patch) | |
tree | 4292199477583d359a9594b19ac0c74485169407 | |
parent | c965919a064f585b05e6a73837b0b050c0d7d9e5 (diff) | |
download | gcc-c25ac92773ac357a9dfb831ded2e071f04ec7735.zip gcc-c25ac92773ac357a9dfb831ded2e071f04ec7735.tar.gz gcc-c25ac92773ac357a9dfb831ded2e071f04ec7735.tar.bz2 |
Correct argument to targetm.calls.promote_prototypes.
* call.c (convert_for_arg_passing): Pass NULL_TREE to
targetm.calls.promote_prototypes.
(type_passed_as): Likewise.
From-SVN: r255455
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/call.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1620b07..d8702e3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2017-12-06 Jason Merrill <jason@redhat.com> + * call.c (convert_for_arg_passing): Pass NULL_TREE to + targetm.calls.promote_prototypes. + (type_passed_as): Likewise. + PR c++/82115 - ICE with variable initialized with its own address. * pt.c (value_dependent_expression_p): Add lval parameter. Don't consider DECL_INITIAL if it's true. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index e046268..bd7666d 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -7350,7 +7350,7 @@ type_passed_as (tree type) /* There are no other pointers to this temporary. */ type = cp_build_qualified_type (type, TYPE_QUAL_RESTRICT); } - else if (targetm.calls.promote_prototypes (type) + else if (targetm.calls.promote_prototypes (NULL_TREE) && INTEGRAL_TYPE_P (type) && COMPLETE_TYPE_P (type) && tree_int_cst_lt (TYPE_SIZE (type), TYPE_SIZE (integer_type_node))) @@ -7390,7 +7390,7 @@ convert_for_arg_passing (tree type, tree val, tsubst_flags_t complain) /* Pass classes with copy ctors by invisible reference. */ else if (TREE_ADDRESSABLE (type)) val = build1 (ADDR_EXPR, build_reference_type (type), val); - else if (targetm.calls.promote_prototypes (type) + else if (targetm.calls.promote_prototypes (NULL_TREE) && INTEGRAL_TYPE_P (type) && COMPLETE_TYPE_P (type) && tree_int_cst_lt (TYPE_SIZE (type), TYPE_SIZE (integer_type_node))) |