[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2018-04-05 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

--- Comment #8 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Thu Apr  5 17:08:21 2018
New Revision: 259137

URL: https://gcc.gnu.org/viewcvs?rev=259137=gcc=rev
Log:
/cp
2018-04-05  Paolo Carlini  

PR c++/80956
* call.c (convert_like_real): Fail gracefully for a broken
std::initializer_list, missing a definition.

* name-lookup.c (do_pushtag): Tweak message, use %< and %>.

/testsuite
2018-04-05  Paolo Carlini  

PR c++/80956
* g++.dg/cpp0x/initlist100.C: New.
* g++.dg/cpp0x/initlist101.C: Likewise.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist100.C
trunk/gcc/testsuite/g++.dg/cpp0x/initlist101.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2018-04-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC|paolo.carlini at oracle dot com|
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #7 from Paolo Carlini  ---
Mine.

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2018-04-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

--- Comment #6 from Paolo Carlini  ---
In this specific case the broken surrogate std::initializer_list cannot be
completed because no definition is provided. Maybe something like the below
then (untested):

Index: call.c
===
--- call.c  (revision 259124)
+++ call.c  (working copy)
@@ -6881,7 +6881,9 @@ convert_like_real (conversion *convs, tree expr, t
  return error_mark_node;

/* Build up the initializer_list object.  */
-   totype = complete_type (totype);
+   totype = complete_type_or_maybe_complain (totype, NULL_TREE, complain);
+   if (!totype)
+ return error_mark_node;
field = next_initializable_field (TYPE_FIELDS (totype));
CONSTRUCTOR_APPEND_ELT (vec, field, array);
field = next_initializable_field (DECL_CHAIN (field));

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2018-04-05 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Paolo Carlini  changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot com

--- Comment #5 from Paolo Carlini  ---
On the original testcase we don't ICE anymore. We still do on the reduced one
attached by Jakub but that seems just a case where we further want to fail more
gracefully for non-conforming std::initializer_list, thus extending what Jason
added a while ago to finish_struct (indeed we neither ICE on the reduced
testcase including ).

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2018-01-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.3 |7.4

--- Comment #4 from Richard Biener  ---
GCC 7.3 is being released, adjusting target milestone.

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2018-01-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

--- Comment #3 from Jakub Jelinek  ---
(In reply to Jakub Jelinek from comment #2)
> Reduced testcase:
> namespace std {
> template  class initializer_list;
> }
> template  struct B { B (std::initializer_list); };
> struct C { virtual int foo (); };
> struct D : C {} d { B { D {} } };
> 
> Perhaps related to PR83227?

Note the testcase also ICEs with -std=c++14, but at a different spot from
-std=c++17.

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2018-01-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Reduced testcase:
namespace std {
template  class initializer_list;
}
template  struct B { B (std::initializer_list); };
struct C { virtual int foo (); };
struct D : C {} d { B { D {} } };

Perhaps related to PR83227?

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2017-08-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.2 |7.3

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2017-08-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.2 |7.3

--- Comment #2 from Richard Biener  ---
GCC 7.2 is being released, adjusting target milestone.

--- Comment #3 from Richard Biener  ---
GCC 7.2 is being released, adjusting target milestone.

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2017-08-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.2 |7.3

--- Comment #2 from Richard Biener  ---
GCC 7.2 is being released, adjusting target milestone.

--- Comment #3 from Richard Biener  ---
GCC 7.2 is being released, adjusting target milestone.

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2017-07-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2017-07-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.2

[Bug c++/80956] [7/8 Regression] ICE with abstract class vector

2017-06-03 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80956

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-06-03
 CC||jason at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
Summary|ICE with abstract class |[7/8 Regression] ICE with
   |vector  |abstract class vector
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, started with r240889.