diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2018-02-13 21:23:22 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2018-02-13 21:23:22 +0000 |
commit | 3a9ad4c190409ee4a9d20ad4f4d1349302e90da7 (patch) | |
tree | 0885f4bb59ba743ef65131f2501c9b4cd248417a /gcc/cp/call.c | |
parent | a2f5a78214edc4716e6f97b97fb7839a211e8ff7 (diff) | |
download | gcc-3a9ad4c190409ee4a9d20ad4f4d1349302e90da7.zip gcc-3a9ad4c190409ee4a9d20ad4f4d1349302e90da7.tar.gz gcc-3a9ad4c190409ee4a9d20ad4f4d1349302e90da7.tar.bz2 |
re PR c++/84333 (ICE with ternary operator in template function)
/cp
2018-02-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84333
* call.c (build_conditional_expr_1): Use cp_save_expr instead of
save_expr for the G++ extension.
/testsuite
2018-02-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84333
* g++.dg/template/sizeof16.C: New.
* g++.dg/template/sizeof17.C: Likewise.
From-SVN: r257638
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 15b723a..7176e4a 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4805,7 +4805,7 @@ build_conditional_expr_1 (location_t loc, tree arg1, tree arg2, tree arg3, if (lvalue_p (arg1)) arg2 = arg1 = cp_stabilize_reference (arg1); else - arg2 = arg1 = save_expr (arg1); + arg2 = arg1 = cp_save_expr (arg1); } /* If something has already gone wrong, just pass that fact up the |