[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-02-11 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

--- Comment #10 from Tony E Lewis  ---
I confirm that my testcase remains fixed on the Godbolt build of g++ trunk
("20200210").

Thanks.

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-01-14 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

--- Comment #9 from CVS Commits  ---
The master branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:08c8c973c082457a7d6192673e87475f1fdfdbef

commit r10-5949-g08c8c973c082457a7d6192673e87475f1fdfdbef
Author: Jason Merrill 
Date:   Tue Jan 14 13:59:54 2020 -0500

PR c++/92590 - wrong handling of inherited default ctor.

I thought my earlier fix for 91930 was an obvious bug fix, but apparently
an
inherited constructor does not count as user-declared.  So this patch
reverts that change and the other follow-on patches, and fixes 91930
differently, by not letting the inherited default constructor hide the
implicitly-declared default constructor.

* class.c (add_method): A constrained inherited ctor doesn't hide an
implicit derived ctor.

Revert:
PR c++/91930 - ICE with constrained inherited default ctor.
* name-lookup.c (do_class_using_decl): Set TYPE_HAS_USER_CONSTRUCTOR
for inherited constructor.
PR c++/92552 - ICE with inherited constrained default ctor.
* pt.c (instantiate_class_template_1): Copy
TYPE_HAS_USER_CONSTRUCTOR.
PR c++/92594 - ICE with inherited trivial default ctor.
* method.c (trivial_fn_p): Treat an inherited default constructor
like a normal default constructor.

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-01-08 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

--- Comment #8 from Tony E Lewis  ---
I see on Godbolt that my similar-looking ICE is also fixed now.

Thanks very much.

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-01-07 Thread gcc-bugs at marehr dot dialup.fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

--- Comment #7 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Thank you!

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-01-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jason Merrill  ---
Fixed.

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-01-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

--- Comment #5 from Jason Merrill  ---
Author: jason
Date: Tue Jan  7 01:07:59 2020
New Revision: 279936

URL: https://gcc.gnu.org/viewcvs?rev=279936=gcc=rev
Log:
PR c++/92552 - ICE with inherited constrained default ctor.

We set TYPE_HAS_USER_CONSTRUCTOR on the template type in lookup_using_decl,
but we didn't copy it to the instantiation.  Setting it in
one_inherited_ctor is too late, as that gets called after we decide whether
to set CLASSTYPE_LAZY_DEFAULT_CTOR.  This change affects other testcases as
well; the changes are fixes for the other inherited constructor tests as
well.

* pt.c (instantiate_class_template_1): Copy
TYPE_HAS_USER_CONSTRUCTOR.
* class.c (one_inherited_ctor): Don't set it here.

Added:
trunk/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor7.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C
trunk/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C
trunk/gcc/testsuite/g++.dg/template/crash7.C
trunk/gcc/testsuite/g++.old-deja/g++.pt/error2.C

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-01-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-01-03 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

--- Comment #4 from Tony E Lewis  ---
Sorry - forgot to include the compiler output...

In file included from
/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/iterator/reverse_iterator.hpp:20,

 from
/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/range/access.hpp:31,

 from
/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/range/concepts.hpp:30,

 from
/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/action/concepts.hpp:23,

 from
/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/range/conversion.hpp:21,

 from :4:

/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/iterator/basic_iterator.hpp:
In instantiation of 'struct
ranges::detail::iterator_associated_types_base_ > >, ranges::ref_view >::cursor, true>':

/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/iterator/basic_iterator.hpp:492:31:
  required from 'struct
ranges::basic_iterator > >, ranges::ref_view >::cursor>'

/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/range/access.hpp:75:13:
  required from 'constexpr auto ranges::_begin_::fn::operator()(R&&) const
requires (_safe_range) && ((has_member_begin) ||
(has_non_member_begin)) [with R =
ranges::join_with_view > >, ranges::ref_view >&]'

/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/range/concepts.hpp:80:9:
  required from 'ranges::detail::to_container::container_t
ranges::detail::to_container::fn::operator()(Rng&&) const requires
(input_range) && (convertible_to_cont_cont)
[with Rng = ranges::join_with_view > >, ranges::ref_view >; MetaFn = meta::id >;
ranges::detail::to_container::container_t =
std::__cxx11::basic_string]'

/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/functional/invoke.hpp:134:34:
  required by substitution of 'template constexpr
decltype ((F&&)(f)((Args&(ranges::invoke_fn::operator()::args))...))
ranges::invoke_fn::operator()(F&&, Args&& ...) const [with F =
ranges::detail::to_container::fn > >;
Args = {ranges::join_with_view,
std::allocator >, std::allocator, std::allocator > > > >, ranges::ref_view >}]'

/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/functional/concepts.hpp:31:9:
  required by substitution of 'template
concepts::return_t, typename
std::enable_if<(invocable, Rng> &&
concepts::detail::CPP_true(concepts::detail::Nil{})), void>::type>
ranges::detail::operator|(Rng&&, ranges::detail::to_container::closure > (*)(ranges::detail::to_container))
[with Rng = ranges::join_with_view > >, ranges::ref_view >; MetaFn = meta::id >]'

:11:19:   required from here

/opt/compiler-explorer/libs/rangesv3/0.10.0/include/range/v3/iterator/basic_iterator.hpp:456:23:
internal compiler error: in lazily_declare_fn, at cp/method.c:3066

  456 | Cur>::readable_iterator_associated_types_base;

  |   ^~~

Please submit a full bug report,

with preprocessed source if appropriate.

See  for instructions.

Compiler returned: 1

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2020-01-03 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

Tony E Lewis  changed:

   What|Removed |Added

 CC||TonyELewis at hotmail dot com

--- Comment #3 from Tony E Lewis  ---
I've seen an ICE which looks likely to be a duplicate of this one. I'll put it
here so it can be retested when this one is fixed to confirm it's also fixed.

My ICE can be seen here: https://godbolt.org/z/R6MgH9

It involves compiling the following code with GCC trunk (20200102) with
`-std=c++2a` with range-v3 0.10.0.


#include 
#include 

#include 
#include 

auto f() {
const std::vector the_strings = { "a", "b" };
return the_strings
| ranges::views::join( "," )
| ranges::to;
}


I can reduce this testcase if its ICE persists after the original ICE is fixed.

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2019-11-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-11-18
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
Started with r274534.

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2019-11-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

[Bug c++/92552] [10 Regression] internal compiler error: in lazily_declare_fn, at cp/method.c:3045 with -fconcepts

2019-11-17 Thread ensadc at mailnesia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92552

ensadc at mailnesia dot com changed:

   What|Removed |Added

 CC||ensadc at mailnesia dot com

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

template  struct basic_mixin {
  basic_mixin() requires true;
};
template 
struct mixin : basic_mixin {
  using basic_mixin::basic_mixin;
};
int main() {
  (void)__is_constructible(mixin);
  // noexcept(mixin()); also triggers ICE
}