14 lines
462 B
Diff
14 lines
462 B
Diff
|
Index: gcc/cp/typeck.c
|
||
|
===================================================================
|
||
|
--- gcc/gcc/cp/typeck.c
|
||
|
+++ gcc/gcc/cp/typeck.c
|
||
|
@@ -2415,7 +2415,7 @@ build_array_ref (array, idx)
|
||
|
return build_conditional_expr
|
||
|
(TREE_OPERAND (array, 0),
|
||
|
build_array_ref (TREE_OPERAND (array, 1), idx),
|
||
|
- build_array_ref (TREE_OPERAND (array, 2), idx));
|
||
|
+ build_array_ref (TREE_OPERAND (array, 2), cxx_unsave_expr_now (idx)));
|
||
|
|
||
|
default:
|
||
|
break;
|