[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-03-25 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 --- Comment #11 from Marek Polacek --- Author: mpolacek Date: Mon Mar 25 16:38:48 2019 New Revision: 269919 URL: https://gcc.gnu.org/viewcvs?rev=269919=gcc=rev Log: PR c++/89214 - ICE when initializing aggregates with bases. *

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-03-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 Marek Polacek changed: What|Removed |Added Keywords||patch --- Comment #10 from Marek

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-03-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 --- Comment #9 from Marek Polacek --- And a fix: --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5978,6 +5978,18 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p, field = next_initializable_field (DECL_CHAIN

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-03-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 --- Comment #8 from Marek Polacek --- Another version, without a converting ctor: struct B { int c; }; struct D : B { }; void fn () { D b{{D{42}}}; }

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-03-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-03-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 --- Comment #7 from Marek Polacek --- And an extended test: // PR c++/89214 // { dg-do compile { target c++17 } } struct A { A (int); }; struct BB { A a; }; struct B : BB { }; void foo () { B b1 = {42}; B b2 = {{42}}; B b3 =

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-03-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 --- Comment #6 from Marek Polacek --- Somewhat cleaned up test: struct A { A (int); }; struct BB { A v; }; struct B : BB {}; B foo () { return {{B {{42; }

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-02-08 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 --- Comment #5 from Marek Polacek --- But we actually called reshape_init: 7146 expr = reshape_init (totype, expr, complain); 7147 expr = get_target_expr_sfinae (digest_init (totype, expr, complain), 7148

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-02-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 Richard Biener changed: What|Removed |Added Keywords||ice-checking Priority|P3

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-02-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 --- Comment #4 from Marek Polacek --- (Your GCC 8 didn't ICE because that was configured with --enable-checking=release.)

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-02-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 --- Comment #3 from Marek Polacek --- We're hitting 1198 /* "If T is a class type and the initializer list has a single 1199 element of type cv U, where U is T or a class derived from T, 1200 the object is initialized from that

[Bug c++/89214] [7/8/9 Regression] ICE in digest_init_r, at cp/typeck2.c:1211 with -std=c++17

2019-02-05 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89214 Marek Polacek changed: What|Removed |Added Keywords||ice-on-valid-code