re PR c++/85847 (unexpected expression of kind template_id_expr)
authorMarek Polacek <polacek@redhat.com>
Thu, 24 May 2018 13:36:21 +0000 (13:36 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 24 May 2018 13:36:21 +0000 (13:36 +0000)
commitea219e6e88a4c0b801b4c5eb971c6727bc31c7e6
treebd4a0e1a00da4a3f5df1439cd5d91c04d25d4efb
parent672dfc39f1dedd8b00fb10f6b7b01671b27c0f86
re PR c++/85847 (unexpected expression of kind template_id_expr)

PR c++/85847
* init.c (build_new_1): Use fold_non_dependent_expr.  Use a dedicated
variable for its result.  Fix a condition.
(build_new): Use fold_non_dependent_expr.  Tweak a condition.

* g++.dg/cpp0x/new3.C: New test.

From-SVN: r260671
gcc/cp/ChangeLog
gcc/cp/init.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/new3.C [new file with mode: 0644]