re PR c++/49253 (Debug-mode forward_list broken)
authorJason Merrill <jason@redhat.com>
Wed, 1 Jun 2011 18:07:03 +0000 (14:07 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 1 Jun 2011 18:07:03 +0000 (14:07 -0400)
PR c++/49253
* typeck2.c (build_x_arrow): Don't use build_min_nt.

From-SVN: r174539

gcc/cp/ChangeLog
gcc/cp/typeck2.c

index 7a8042b6194c2b5c18d1c7d34c1b984df8a79a36..921f98f11ac588fae6fa711d9e49d2d7cb7330e7 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-01  Jason Merrill  <jason@redhat.com>
+
+       PR c++/49253
+       * typeck2.c (build_x_arrow): Don't use build_min_nt.
+
 2010-05-31  Fabien ChĂȘne  <fabien@gcc.gnu.org>
 
        PR c++/48010
index 031f076863f0d85b1542f7fb1504fce27b61211b..4d5c21ad5f32d6c3dc9e40b0ba46ced3c3f38d27 100644 (file)
@@ -1463,9 +1463,9 @@ build_x_arrow (tree expr)
     {
       if (processing_template_decl)
        {
-         expr = build_min_non_dep (ARROW_EXPR, last_rval, orig_expr);
-         /* It will be dereferenced.  */
-         TREE_TYPE (expr) = TREE_TYPE (TREE_TYPE (last_rval));
+         expr = build_min (ARROW_EXPR, TREE_TYPE (TREE_TYPE (last_rval)),
+                           orig_expr);
+         TREE_SIDE_EFFECTS (expr) = TREE_SIDE_EFFECTS (last_rval);
          return expr;
        }