diff options
author | Jason Merrill <jason@redhat.com> | 2013-01-07 13:00:18 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2013-01-07 13:00:18 -0500 |
commit | e4d7d8cb6990399ee4a83a9a6711374ef6202795 (patch) | |
tree | 4eab6b88d3becdcd887ac239524845fd3741e197 /gcc/cp/tree.c | |
parent | 656e6f3761bb4bfe3efe8279710f5f4b980604fa (diff) | |
download | gcc-e4d7d8cb6990399ee4a83a9a6711374ef6202795.zip gcc-e4d7d8cb6990399ee4a83a9a6711374ef6202795.tar.gz gcc-e4d7d8cb6990399ee4a83a9a6711374ef6202795.tar.bz2 |
re PR c++/55753 ([C++11][4.7/4.8 Regression] ICE constexpr ctor, tsubst_copy_and_build, at cp/pt.c:14336)
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.
From-SVN: r194986
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index fcab1a4..0824214 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) |