[Bug c++/87125] [9 Regression] ICE in tsubst_copy starting with r261084

2018-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87125

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #5 from Jakub Jelinek  ---
Indeed, it is.

*** This bug has been marked as a duplicate of bug 87814 ***

[Bug c++/87125] [9 Regression] ICE in tsubst_copy starting with r261084

2018-12-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87125

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Fri Dec 21 12:11:57 2018
New Revision: 267324

URL: https://gcc.gnu.org/viewcvs?rev=267324=gcc=rev
Log:
PR c++/87125
* g++.dg/cpp0x/pr87125.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr87125.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/87125] [9 Regression] ICE in tsubst_copy starting with r261084

2018-12-21 Thread ensadc at mailnesia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87125

--- Comment #3 from ensadc at mailnesia dot com ---
(In reply to ensadc from comment #2)
> Reduced:
> 
> template struct ch {
>   template constexpr ch(by) noexcept(br());
> };
> class ce : ch {
>   using ch::ch;
> };
> 
> void f() {
>   noexcept(ce(0));
> }

This appears similar to bug 87814 (which is fixed in r267155). Maybe a
duplicate?

[Bug c++/87125] [9 Regression] ICE in tsubst_copy starting with r261084

2018-12-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87125

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code,
   ||ice-on-valid-code
   Priority|P3  |P1

[Bug c++/87125] [9 Regression] ICE in tsubst_copy starting with r261084

2018-08-30 Thread ensadc at mailnesia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87125

ensadc at mailnesia dot com changed:

   What|Removed |Added

 CC||ensadc at mailnesia dot com

--- Comment #2 from ensadc at mailnesia dot com ---
Reduced:

template struct ch {
  template constexpr ch(by) noexcept(br());
};
class ce : ch {
  using ch::ch;
};

void f() {
  noexcept(ce(0));
}

[Bug c++/87125] [9 Regression] ICE in tsubst_copy starting with r261084

2018-08-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87125

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-28
 CC||jason at gcc dot gnu.org
   Target Milestone|--- |9.0
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
The ICE is:
/usr/src/gcc/obj/gcc/rh1622598.ii: In instantiation of ‘constexpr
x::ce, am >, ch, am > >::ce(by) [with by = int (*)()][inherited from
ch, am >]’:
/usr/src/gcc/obj/gcc/rh1622598.ii:118:8:   required from ‘void de<
,  >::begin_cursor_(bs) [with
bs = int;  = int;  = int]’
/usr/src/gcc/obj/gcc/rh1622598.ii:120:8:   required by substitution of
‘template > decltype (((de*)this)->de::begin_cursor_(bs())) de::cw >() [with bs =
int; int  = 0]’
/usr/src/gcc/obj/gcc/rh1622598.ii:106:31:   required by substitution of
‘template decltype (cx.cw()) cu::cw(cv, long int) [with cv =
iter_transform_view]’
/usr/src/gcc/obj/gcc/rh1622598.ii:108:52:   required by substitution of
‘template using cz = u [with cy =
iter_transform_view]’
/usr/src/gcc/obj/gcc/rh1622598.ii:109:45:   required by substitution of
‘template using da = z::bz > [with cy = iter_transform_view]’
/usr/src/gcc/obj/gcc/rh1622598.ii:113:10:   required by substitution of
‘template > da db::begin
>() [with bs = iter_transform_view; int  = 0]’
/usr/src/gcc/obj/gcc/rh1622598.ii:149:16:   required from here
/usr/src/gcc/obj/gcc/rh1622598.ii:84:13: internal compiler error: in
tsubst_copy, at cp/pt.c:15962
84 |   using cf::f;
   | ^
0xa78ebc tsubst_copy
../../gcc/cp/pt.c:15962
0xa8ad08 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/cp/pt.c:19038
0xa70a2a tsubst_exception_specification
../../gcc/cp/pt.c:14121
0xa9c93c regenerate_decl_from_template
../../gcc/cp/pt.c:23454
0xa9fe45 instantiate_decl(tree_node*, bool, bool)
../../gcc/cp/pt.c:24024
0x8aa7c3 instantiate_cx_fn_r
../../gcc/cp/constexpr.c:4902
0x1633540 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set >*))
../../gcc/tree.c:11502
0x1634b8b walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set >*))
../../gcc/tree.c:11820
0x1634c98 walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*))
../../gcc/tree.c:11846
0x8aa9eb instantiate_constexpr_fns
../../gcc/cp/constexpr.c:4921
0x8aad66 cxx_eval_outermost_constant_expr
../../gcc/cp/constexpr.c:4977
0x8ab9b1 maybe_constant_value(tree_node*, tree_node*)
../../gcc/cp/constexpr.c:5205
0x8abe08 fold_non_dependent_expr(tree_node*, int)
../../gcc/cp/constexpr.c:5297
0xb473b1 massage_init_elt
../../gcc/cp/typeck2.c:1264
0xb48429 process_init_constructor_record
../../gcc/cp/typeck2.c:1482
0xb4964e process_init_constructor
../../gcc/cp/typeck2.c:1744
0xb46d43 digest_init_r
../../gcc/cp/typeck2.c:1158
0xb46f4d digest_init_flags(tree_node*, tree_node*, int, int)
../../gcc/cp/typeck2.c:1203
0xad3e26 finish_compound_literal(tree_node*, tree_node*, int, fcl_t)
../../gcc/cp/semantics.c:2831
0xa89fe7 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/cp/pt.c:18877
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

where tsubst_copy doesn't handle DEFERRED_NOEXCEPT tree.