This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/55419] [4.7/4.8 Regression] ICE in gimplify_init_ctor_preeval, at gimplify.c:3587


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55419

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-21 11:18:22 UTC ---
   /* We always set TREE_SIDE_EFFECTS so that expand_expr does not
      ignore the TARGET_EXPR.  If there really turn out to be no
      side-effects, then the optimizer should be able to get rid of
      whatever code is generated anyhow.  */
   TREE_SIDE_EFFECTS (t) = 1;
+  if (literal_type_p (type))
+    TREE_CONSTANT (t) = TREE_CONSTANT (value);

So we end up with TARGET_EXPR with TREE_SIDE_EFFECTS, but TREE_CONSTANT set
too, which is what the gimplifier is complaining about.  constants shouldn't
have side-effects.  If this is some trick internal to the C++ FE, then at least
the genericizer should drop TREE_CONSTANT from TARGET_EXPRs with
TREE_SIDE_EFFECTS set that are passed down to the middle-end.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]