]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/66515 (g++ segfaults when creating an std::initializer_list)
authorJason Merrill <jason@redhat.com>
Mon, 22 Jun 2015 17:24:25 +0000 (13:24 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 22 Jun 2015 17:24:25 +0000 (13:24 -0400)
PR c++/66515
* call.c (implicit_conversion): Only reshape for classes.

From-SVN: r224748

gcc/cp/ChangeLog
gcc/cp/call.c

index 7b3cd2ce7209e5141a5f29e40767d7b69f029784..9f4e8b21e3d29a750b6d6077f25fcfd09d5f4c56 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-22  Jason Merrill  <jason@redhat.com>
+
+       PR c++/66515
+       * call.c (implicit_conversion): Only reshape for classes.
+
 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
 
        * pt.c (maybe_adjust_types_for_deduction): Use std::swap instead of
index ba5da4c36daebe9dffc8fdb06c7ab9f6460ce613..a6c313aed59173cdb724ae936280bdf06de5999d 100644 (file)
@@ -1759,8 +1759,9 @@ implicit_conversion (tree to, tree from, tree expr, bool c_cast_p,
 
   /* Call reshape_init early to remove redundant braces.  */
   if (expr && BRACE_ENCLOSED_INITIALIZER_P (expr)
+      && CLASS_TYPE_P (to)
       && COMPLETE_TYPE_P (complete_type (to))
-      && CP_AGGREGATE_TYPE_P (to))
+      && !CLASSTYPE_NON_AGGREGATE (to))
     {
       expr = reshape_init (to, expr, complain);
       if (expr == error_mark_node)
This page took 0.079356 seconds and 5 git commands to generate.