summaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-07 18:00:18 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-07 18:00:18 +0000
commit261cfa0eae650a4ee9dead29a2c2bf481b27d350 (patch)
tree4eab6b88d3becdcd887ac239524845fd3741e197 /gcc/cp/tree.c
parent046a838d4bd78003015b5b7d359503a6793b7262 (diff)
downloadgcc-261cfa0eae650a4ee9dead29a2c2bf481b27d350.tar.gz
PR c++/55753
* tree.c (build_aggr_init_expr): Do nothing in a template. * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Strip an ADDR_EXPR off a FUNCTION_DECL before tsubsting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index fcab1a44ff6..08242141cb1 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -412,6 +412,10 @@ build_aggr_init_expr (tree type, tree init)
tree rval;
int is_ctor;
+ /* Don't build AGGR_INIT_EXPR in a template. */
+ if (processing_template_decl)
+ return init;
+
if (TREE_CODE (init) == CALL_EXPR)
fn = CALL_EXPR_FN (init);
else if (TREE_CODE (init) == AGGR_INIT_EXPR)