[Bug c++/90432] [9/10 Regression] Internal compiler error with no_unique_address empty type with constructor call followed by value initialized to non-zero

2020-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90432

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/91953] [8 Regression] G++ rejects lambda with constexpr variable

2020-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91953

Jason Merrill  changed:

   What|Removed |Added

Summary|[8/9 Regression] G++|[8 Regression] G++ rejects
   |rejects lambda with |lambda with constexpr
   |constexpr variable  |variable

--- Comment #10 from Jason Merrill  ---
Fixed for 9.3 as well.

[Bug c++/92601] [9 Regression] error: type variant differs by TYPE_NEEDS_CONSTRUCTING

2020-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92601

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed for 9.3.

[Bug c++/91678] [9 Regression] decltype returns wrong type under certain conditions

2020-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91678

--- Comment #11 from Jason Merrill  ---
(In reply to Marek Polacek from comment #10)
> Don't know if I should pursue this backport.

Seems like it depends on other fixes, not sure how hard they will be to find. 
Your call.

[Bug c++/90432] [9/10 Regression] Internal compiler error with no_unique_address empty type with constructor call followed by value initialized to non-zero

2020-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90432

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed for 9.3/10.

[Bug c++/90997] [9 Regression] ICE on a memset in a template in tsubst_copy_and_build, at cp/pt.c:18480

2020-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90997

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
And 9.3.

[Bug c++/90691] [9 regression] -Wsign-compare false-positive with constant

2020-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90691

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|9.3 |10.0

--- Comment #10 from Jason Merrill  ---
The fix isn't suitable for backporting.

[Bug c++/91607] [9 regression] internal compiler error: in equal, at cp/constexpr.c:1088

2020-03-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91607

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/91607] [9 regression] internal compiler error: in equal, at cp/constexpr.c:1088

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91607

Jason Merrill  changed:

   What|Removed |Added

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

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

https://gcc.gnu.org/g:a258e46458043b11495faef119489a776eb68f60

commit r10-7041-ga258e46458043b11495faef119489a776eb68f60
Author: Jason Merrill 
Date:   Thu Mar 5 10:11:36 2020 -0500

c++: Add test for PR91607.

 PR c++/91607
 * g++.dg/cpp0x/constexpr-const3.C: New.

--- Comment #15 from Jason Merrill  ---
Fixed for 9.3.

[Bug c++/89404] [8/9 Regression] ICE in build_value_init_noctor, at cp/init.c:467

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89404

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution|--- |FIXED
   Target Milestone|8.5 |10.0

--- Comment #6 from Jason Merrill  ---
Doesn't seem worthwhile to try to find and backport the fix for an
ice-on-invalid.

[Bug c++/90338] [9 Regression] member function pointer non-type template parameter compile fail while matching

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90338

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/88820] [8 Regression] ICE in in C++2a mode for code which is able to be compiled in C++17 mode

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88820

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|8.5 |8.4

--- Comment #17 from Jason Merrill  ---
Fixed in 8.4.

[Bug c++/90338] [9 Regression] member function pointer non-type template parameter compile fail while matching

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90338

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed for 9.3.

[Bug c++/89875] [8/9 Regression] invalid typeof reference to a member of an incomplete struct accepted at function scope

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89875

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution|--- |FIXED
   Target Milestone|8.5 |10.0

--- Comment #8 from Jason Merrill  ---
No need to backport this.

[Bug c++/88395] ICE: Segmentation fault signal terminated program cc1plus, with -std=c++2a -fconcepts

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88395

Jason Merrill  changed:

   What|Removed |Added

 CC||h2+bugs at fsfe dot org

--- Comment #13 from Jason Merrill  ---
*** Bug 92778 has been marked as a duplicate of this bug. ***

[Bug c++/92778] [8/9 regression] ICE: Illegal instruction signal terminated program cc1plus

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92778

Jason Merrill  changed:

   What|Removed |Added

   Keywords|ice-on-valid-code   |ice-on-invalid-code
 Status|UNCONFIRMED |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #7 from Jason Merrill  ---
The ICE on linux with GCC 9 is from infinite recursion checking the constraints
on

seqan3::detail::view_translate_single::view_translate_single(rng_t&&,
seqan3::translation_frames = seqan3::translation_frames::FWD_FRAME_0) [with
rng_t =
ranges::reverse_view
> > >; urng_t = ranges::ref_view >]

checking std::ranges::viewable_range for reverse_view involves
checking view_ for reverse_view ->
checking semiregular for reverse_view ->
checking copyable ->
copy_constructible ->
move_constructible ->
__is_constructible(reverse_view,reverse_view) trait
which considers
reverse_view(Rng) with Rng=view_translate_single
which tries to construct a view_translate_single from the reverse_view using
the above constructor, and repeat until we run out of stack.

So, a duplicate of 88395.

Reduced:

template  T&& declval();
template  struct B
{
  B(T);
};
struct A
{
  template 
  requires __is_constructible (U,U)
A(U&&);
};
int main()
{
  A a(declval>());
}

This fails in

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

[Bug c++/93753] [8 Regression] ICE on a flexible array followed by a member in an anonymous struct with an initializer

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93753

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
   Target Milestone|--- |8.5

[Bug c++/67491] [meta-bug] concepts issues

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 88395, which changed state.

Bug 88395 Summary: ICE: Segmentation fault signal terminated program cc1plus, 
with -std=c++2a -fconcepts
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88395

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

[Bug c++/88395] ICE: Segmentation fault signal terminated program cc1plus, with -std=c++2a -fconcepts

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88395

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.3

--- Comment #15 from Jason Merrill  ---
Fixed for 9.3/10.

[Bug c++/94041] [10 Regression] temporary object destructor called before the end of the full-expression since r10-5577

2020-03-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94041

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94041] [10 Regression] temporary object destructor called before the end of the full-expression since r10-5577

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94041

--- Comment #4 from Jason Merrill  ---
This turned out to be a long-standing bug with split_nonconstant_init (since
4.7, apparently): initializion of individual elements of an aggregate are not a
full-expressions, but split_nonconstant_init was making full-expressions out of
them.  My fix for PR66139 extended the use of split_nonconstant_init, and thus
the bug, to aggregate initialization of temporaries within an expression, in
which context the bug is more noticeable.

This is a tricky one, getting back into the issues with cleanups not nesting
properly that wrap_temporary_cleanups handles some of, but not this example.

[Bug c++/93922] [10 Regression] Fails to emit inline class template destructor instantiation, but which is called

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93922

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/57510] subobjects not destroyed when exception thrown during list-initialization

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57510

Jason Merrill  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #14 from Jason Merrill  ---
Let's close this one and handle the remaining cases under PRs 52320 and 66139.

[Bug c++/66139] destructor not called for members of partially constructed anonymous struct/array

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66139

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|10.0|---
  Known to work|10.0|

--- Comment #19 from Jason Merrill  ---
No longer fixed for GCC 10.

[Bug c++/93922] [10 Regression] Fails to emit inline class template destructor instantiation, but which is called

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93922

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #7 from Jason Merrill  ---
Fixed by reverting the patch for PR 66139.

[Bug c++/94041] [10 Regression] temporary object destructor called before the end of the full-expression since r10-5577

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94041

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed by reverting the fix for PR66139.

[Bug c++/93901] [10 Regression] noexcept specifier on ctor does not work with constexpr variable or expression since r10-4394

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93901

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/93596] [10 Regression] ICE related to templates and vectors.

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93596

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/93901] [10 Regression] noexcept specifier on ctor does not work with constexpr variable or expression since r10-4394

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93901

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed for GCC 10 by reverting the offending patch.

[Bug c++/93596] [10 Regression] ICE related to templates and vectors.

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93596

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/93907] [10 Regression] internal compiler error: in hashtab_chk_error, at hash-table.c:137

2020-03-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93907

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/93907] [10 Regression] internal compiler error: in hashtab_chk_error, at hash-table.c:137

2020-03-11 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93907

Jason Merrill  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |10.0
 Status|ASSIGNED|RESOLVED

--- Comment #4 from Jason Merrill  ---
Fixed in r10-7133-gbde31a76ba48be49dbe26317ce5e19d10ae9f310

[Bug c++/93248] [8/9/10 Regression] ICE in decltype of template constructor with default argument within a class template since r8-2712

2020-03-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93248

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/92909] [8/9/10 Regression] ICE on incorrect lambda inside variadic template

2020-03-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92909

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/92068] [8/9/10 Regression] ICE on invalid in process_partial_specialization

2020-03-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92068

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/91966] [8/9/10 Regression] pack expansion for Cartesian product breaks if certain indirections are involved since r6-1487-g1a4cd2cd7e7266b0

2020-03-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91966

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/92909] [8/9/10 Regression] ICE on incorrect lambda inside variadic template

2020-03-15 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92909

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed for 8.5/9.4/10.

[Bug c++/92068] [8/9/10 Regression] ICE on invalid in process_partial_specialization

2020-03-15 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92068

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed for 8.5/9.4/10.

[Bug c++/93248] [8/9/10 Regression] ICE in decltype of template constructor with default argument within a class template since r8-2712

2020-03-15 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93248

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed for 8.5/9.4/10.

[Bug c++/94186] [10 Regression] compiler incorrectly accepts a requires clause with predicate of non-bool type

2020-03-16 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94186

Jason Merrill  changed:

   What|Removed |Added

 CC||andrew.n.sutton at gmail dot 
com

--- Comment #2 from Jason Merrill  ---
Andrew, thoughts?

[Bug c++/94175] [10 Regression] Passing constexpr empty class variable to function since r10-599

2020-03-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94175

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94175] [10 Regression] Passing constexpr empty class variable to function since r10-599

2020-03-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94175

--- Comment #1 from Jason Merrill  ---
Testcase using fewer C++ features:

struct A {};
extern A a;

int i;
[[gnu::noinline, gnu::noclone]]
void f(A) { ++i; }

int main()
{
  f(a);
}

[Bug debug/93751] -g1 does not behave per manual

2020-03-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93751

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Target Milestone|--- |10.0
 CC||jason at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #19 from Jason Merrill  ---
Fixed for GCC 10.

[Bug c++/94175] [10 Regression] Passing constexpr empty class variable to function since r10-599

2020-03-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94175

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill  ---
(In reply to Jakub Jelinek from comment #2)
> But for #c1 it is just a missed-optimization, while if the passing of a
> constexpr var to a function isn't an ODR use, isn't it then a standard
> violation that we aren't optimizing the variable read into its value?

True, but the fix is the same.

[Bug c++/94186] [10 Regression] compiler incorrectly accepts a requires clause with predicate of non-bool type

2020-03-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94186

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Target Milestone|--- |10.0
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/94186] [10 Regression] compiler incorrectly accepts a requires clause with predicate of non-bool type

2020-03-24 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94186

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
(In reply to Paolo Carlini from comment #3)
> Isn't this fixable by simply tweaking satisfy_atom to unconditionally issue
> the error?

Yes, but I thought we could do better. :)

[Bug c++/94314] [10 Regression] Optimizing mismatched new/delete pairs

2020-03-24 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94314

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org

--- Comment #1 from Jason Merrill  ---
Martin?

[Bug c++/94314] [10 Regression] Optimizing mismatched new/delete pairs since r10-2106-g6343b6bf3bb83c87

2020-03-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94314

--- Comment #6 from Jason Merrill  ---
(In reply to Marc Glisse from comment #5)
> I don't think we need heavy machinery linking new and delete (and if we did
> I'd be tempted to store it in some global table rather than in the nodes).
> The most important case is the global replacable functions, for which we
> have a finite list, and for those a few checks like not matching array with
> non-array versions should do. For user overloads with attribute malloc (a
> gcc extension), I would go with heuristics like both/neither being class
> members, being members of the same class, etc. Although I am not quite sure
> how doable that is from the middle-end, how much of that information is
> still available (I think it is available in the mangled name, but demangling
> doesn't seem like a great idea).

It should be sufficient to check whether they have the same DECL_CONTEXT.

[Bug c++/90711] [9/10 Regression] Failing SFINAE from unrelated struct since r9-6794

2020-03-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90711

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/90711] [9/10 Regression] Failing SFINAE from unrelated struct since r9-6794

2020-03-31 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90711

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed for 9.4/10.

[Bug c++/94205] [8/9/10 Regression] ICE in cxx_eval_constant_expression with 'this'-capturing lambda inside an NSDMI since r8-1251

2020-03-31 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94205

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94205] [8/9/10 Regression] ICE in cxx_eval_constant_expression with 'this'-capturing lambda inside an NSDMI since r8-1251

2020-03-31 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94205

--- Comment #2 from Jason Merrill  ---
C++14 version that goes back to the introduction of C++14 constexpr in GCC 5:

struct S
{
  struct A
  {
S *p;
constexpr A(S* p): p(p) {}
constexpr operator int() { p->a = 5; return 6; }
  };
  int a = A(this);
};


constexpr S s = {};

#define SA(X) static_assert((X),#X)
SA(s.a == 6);

[Bug c++/91966] [8 Regression] pack expansion for Cartesian product breaks if certain indirections are involved since r6-1487-g1a4cd2cd7e7266b0

2020-04-03 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91966

Jason Merrill  changed:

   What|Removed |Added

Summary|[8/9 Regression] pack   |[8 Regression] pack
   |expansion for Cartesian |expansion for Cartesian
   |product  breaks if certain  |product  breaks if certain
   |indirections are involved   |indirections are involved
   |since   |since
   |r6-1487-g1a4cd2cd7e7266b0   |r6-1487-g1a4cd2cd7e7266b0

--- Comment #5 from Jason Merrill  ---
Fixed for 9.4/10.  Does anyone care about fixing this in GCC 8?

[Bug c++/94453] [10 Regression] ICE in make_decl_rtl since r10-3591

2020-04-03 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94453

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/67825] [concepts] expression constraint bug when taking address of a member function

2020-04-03 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67825

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Last reconfirmed||2020-04-04
 Ever confirmed|0   |1

[Bug c++/94453] [10 Regression] ICE in make_decl_rtl since r10-3591

2020-04-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94453

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/91377] [8/9/10 Regression] ICE with non-static block scope constexpr, captured in lambda, used as template parameter

2020-04-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91377

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Further reduced:

struct f {
  static constexpr int d = 3;
  typedef int e;
};
template  struct x { };
template  using n = x;
template  auto v() -> n;
void af() { v(); }

[Bug c++/94205] [8/9/10 Regression] ICE in cxx_eval_constant_expression with 'this'-capturing lambda inside an NSDMI since r8-1251

2020-04-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94205

Jason Merrill  changed:

   What|Removed |Added

   Assignee|jason at gcc dot gnu.org   |unassigned at gcc dot 
gnu.org

--- Comment #4 from Jason Merrill  ---
Patrick is working on the remaining parts of this bug.

[Bug c++/67825] [concepts] expression constraint bug when taking address of a member function

2020-04-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67825

Jason Merrill  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Target Milestone|--- |10.0
 Status|ASSIGNED|RESOLVED

--- Comment #3 from Jason Merrill  ---
Actually fixed for GCC 10.

[Bug c++/91377] [8/9/10 Regression] ICE with non-static block scope constexpr, captured in lambda, used as template parameter

2020-04-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91377

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #10 from Jason Merrill  ---
Fixed for 8.5/9.4/10.

[Bug c++/67491] [meta-bug] concepts issues

2020-04-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 67825, which changed state.

Bug 67825 Summary: [concepts] expression constraint bug when taking address of 
a member function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67825

   What|Removed |Added

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

[Bug c++/94462] [10 Regression] ICE in duplicate_decls, at cp/decl.c:1456 since r10-6586-gd6ef77e023cfe0bb

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

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94462] [10 Regression] ICE in duplicate_decls, at cp/decl.c:1456 since r10-6586-gd6ef77e023cfe0bb

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

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/94481] [10 Regression] ICE: Segmentation fault (in cp_parser_placeholder_type_specifier)

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

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94480] [10 Regression] ICE in cp_parser_abort_tentative_parse, at cp/parser.c:31858

2020-04-07 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94480

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94481] [10 Regression] ICE: Segmentation fault (in cp_parser_placeholder_type_specifier)

2020-04-07 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94481

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/94480] [10 Regression] ICE in cp_parser_abort_tentative_parse, at cp/parser.c:31858

2020-04-07 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94480

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/94523] [10 Regression] error: 'constexpr' evaluation depth exceeds maximum of 512 (use '-fconstexpr-depth=' to increase the maximum) since r10-7490-g76f09260b7eccd6c

2020-04-08 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94523

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94034] [10 Regression] Broken diagnostic: 'result_decl' not supported by dump_expr

2020-04-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94034

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #6 from Jason Merrill  ---
(In reply to Patrick Palka from comment #5)
> Here is a rejects-valid testcase caused by the same underlying issue:

Actually, A does not have guaranteed copy elision in function argument passing
or return.  Which is a good thing, since it can't have it under the current
ABI.

http://eel.is/c++draft/class.temporary#3 

"When an object of class type X is passed to or returned from a function, if X
has at least one eligible copy or move constructor ([special]), each such
constructor is trivial, and the destructor of X is either trivial or deleted,
implementations are permitted to create a temporary object to hold the function
parameter or result object."

So I suppose my comment on Paolo's patch was wrong, and this is only a
diagnostic quality issue after all.

[Bug c++/94537] Possibly wrong code with mandatory copy elision and 'this' pointer resolution

2020-04-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94537

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID
 CC||jason at gcc dot gnu.org

--- Comment #3 from Jason Merrill  ---
As described in my patch for PR 94034, these testcases are not guaranteed to
work because A is trivially copyable and therefore the implementation can
introduce an extra temporary on return.

[Bug c++/94034] [10 Regression] Broken diagnostic: 'result_decl' not supported by dump_expr

2020-04-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94034

--- Comment #7 from Jason Merrill  ---
(In reply to Jason Merrill from comment #6)
> So I suppose my comment on Paolo's patch was wrong, and this is only a
> diagnostic quality issue after all.

Ah, there is a constexpr issue to fix: if we add constructors to A, we should
get guaranteed RVO, but still see the same bogus error.

struct A {
  A() = default; A(const A&);
  A *ap = this;
};
constexpr A foo() { return {}; }
static constexpr A a = foo(); // works without 'constexpr'
int main() {
  if (&a != a.ap)
__builtin_abort();
}

[Bug c++/94537] Possibly wrong code with mandatory copy elision and 'this' pointer resolution

2020-04-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94537

--- Comment #4 from Jason Merrill  ---
(In reply to Jason Merrill from comment #3)
> As described in my patch for PR 94034, these testcases are not guaranteed to

s/patch/comment/

[Bug c++/94523] [10 Regression] error: 'constexpr' evaluation depth exceeds maximum of 512 (use '-fconstexpr-depth=' to increase the maximum) since r10-7490-g76f09260b7eccd6c

2020-04-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94523

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/94546] [10 Regression] unimplemented: unexpected AST of kind nontype_argument_pack

2020-04-10 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94546

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94510] [9 Regression] nullptr_t implicitly cast to zero twice in std::array

2020-04-21 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94510

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
Summary|[9/10 Regression] nullptr_t |[9 Regression] nullptr_t
   |implicitly cast to zero |implicitly cast to zero
   |twice in std::array |twice in std::array

--- Comment #12 from Jason Merrill  ---
Fixed for GCC 10 so far.

[Bug c++/94546] [10 Regression] unimplemented: unexpected AST of kind nontype_argument_pack

2020-04-21 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94546

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed

[Bug c++/94510] [9 Regression] nullptr_t implicitly cast to zero twice in std::array

2020-04-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94510

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #14 from Jason Merrill  ---
Fixed for 9.4/10.

[Bug c++/94645] [10 Regression][concepts] incorrect concept evaluation with decltype, plus internal error since r10-7554-gf1ad7bac76b66257

2020-04-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94645

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421

2020-04-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421

2020-04-24 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/79585] spurious -Wunused-variable on a pointer with attribute unused in function template

2020-04-27 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79585

Jason Merrill  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Target Milestone|--- |10.0
 CC||jason at gcc dot gnu.org
 Status|NEW |ASSIGNED

[Bug c++/90750] [9 Regression] ICE in cp_default_conversion, at cp/typeck.c:2162

2020-04-28 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90750

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed for 9.4/10.

[Bug c++/79585] spurious -Wunused-variable on a pointer with attribute unused in function template

2020-04-28 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79585

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|10.0|9.4
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Jason Merrill  ---
Fixed for 9.4/10.

[Bug c/89180] [meta-bug] bogus/missing -Wunused warnings

2020-04-28 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89180
Bug 89180 depends on bug 79585, which changed state.

Bug 79585 Summary: spurious -Wunused-variable on a pointer with attribute 
unused in function template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79585

   What|Removed |Added

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

[Bug c++/90992] [9/10 Regression] -Wnoexcept produce false positive

2020-04-28 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90992

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|9.4 |10.0
 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #14 from Jason Merrill  ---
Since no other testcase has appeared, I'm calling this fixed in GCC 10.

[Bug c++/90748] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15564

2020-04-28 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90748

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/90748] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15564

2020-04-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90748

--- Comment #5 from Jason Merrill  ---
Created attachment 48413
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48413&action=edit
diagnostic patch

diagnostic improvement, waiting for gcc 11.

[Bug c++/90748] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15564

2020-04-29 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90748

--- Comment #4 from Jason Merrill  ---
Created attachment 48412
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48412&action=edit
fix

fix, waiting for gcc 11

[Bug c++/93822] [8/9/10 Regression] ICE in make_ssa_name_fn, at tree-ssanames.c:279 since r7-536-g381cdae49785fc4b

2020-04-30 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93822

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/94888] segment fault

2020-04-30 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94888

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #6 from Jason Merrill  ---
G++ doesn't elide the copy because the constructor template is not eligible for
copy elision: only non-template constructors are considered to be copy/move
constructors.  Without a destructor, the implicitly declared move constructor
is a better candidate than the template, but a user-declared destructor
prevents the implicit declaration of a move constructor.  Adding

Function(Function&&) = default;

to Function fixes the problem.

I don't know why other compilers do something different with this testcase.

[Bug c++/91529] [8/9/10/11 Regression] -fmerge-all-constants leads to corrupt output without inlining

2020-04-30 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91529

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/90749] [8/9/10/11 Regression] ICE in enclosing_instantiation_of, at cp/pt.c:13462

2020-04-30 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90749

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/90212] [8/9/10/11 Regression] by-ref capture of constexpr class object rejected

2020-04-30 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90212

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/91133] [8/9/10/11 Regression] Wrong "partial specialization is not more specialized than" error

2020-04-30 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91133

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/91133] [8/9/10/11 Regression] Wrong "partial specialization is not more specialized than" error

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

--- Comment #4 from Jason Merrill  ---
This is really a question of partial ordering; determining whether the partial
specialization is more specialized than the primary class template is
equivalent to this testcase:

template struct Id { typedef T type; };
template struct A {};

templatevoid f(A); // #1
template::type X> void f(A); // #2

int main()
{
  f(A()); // is #2 more specialized?
}

This was rejected as ambiguous by GCC going back at least to 4.1.  It is also
rejected by EDG/icc.  It is accepted by clang and msvc, like the original
testcase.

The issue is with the partial ordering deduction of #1 from #2: we deduce int
for U from the second argument, and Id::type for U from the third argument,
and those don't agree, so deduction for the third argument fails in both
directions, and the functions are ambiguous.

This is related to open core issues 455 and 1337.

I don't know what rationale clang/msvc are using to conclude that #2 is more
specialized.

[Bug c++/90749] [8/9/10/11 Regression] ICE in enclosing_instantiation_of, at cp/pt.c:13462

2020-05-05 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90749

--- Comment #3 from Jason Merrill  ---
Fixed on trunk by r11-17-g82d5decef38b5562d97c49a70ca2636a08769dbc

[Bug c++/90748] [9/10 Regression] ICE in tsubst_copy, at cp/pt.c:15564

2020-05-11 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90748

Jason Merrill  changed:

   What|Removed |Added

Summary|[9/10/11 Regression] ICE in |[9/10 Regression] ICE in
   |tsubst_copy, at |tsubst_copy, at
   |cp/pt.c:15564   |cp/pt.c:15564

--- Comment #7 from Jason Merrill  ---
Fixed for GCC 11 so far.

[Bug c++/95036] [9/10/11 Regression] ICE with variadic type/nttp template templates

2020-05-12 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95036

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/95221] g++.dg/ubsan/vptr-12.C fails with -fstrong-eval-order=all

2020-05-19 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95221

Jason Merrill  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2020-05-20
 Status|UNCONFIRMED |NEW

--- Comment #6 from Jason Merrill  ---
(In reply to Marek Polacek from comment #2)
> I think the thing is that we have a CALL_EXPR, something like
> 
>   OBJ_TYPE_REF (...) (.UBSAN_VPTR ())
> 
> and now we first evaluate the OBJ_TYPE_REF.

Yep, that's the problem.

We're currently sanitizing the vtable when determining the 'this' argument to
the function, separately from looking at the vtable in order to determine which
function to call.  In C++14 we evaluate 'this' first, in C++17 we evaluate the
function first.  build_over_call tries to share any side-effects between the
'this' and the OBJ_TYPE_REF with a save_expr, but then
cp_ubsan_maybe_instrument_member_call adds the sanitization only to the 'this'
argument, breaking that sharing and introducing a fragile order dependency.

A simple fix might be to not preevaluate when CALL_EXPR_FN is an OBJ_TYPE_REF,
as the sharing above should mean that side-effects happen when the object
argument is evaluated, which should be what we want.  It occurs to me that the
current preevaluation is wrong for a virtual assignment when
CALL_EXPR_REVERSE_ARGS is set.

[Bug c++/95221] g++.dg/ubsan/vptr-12.C fails with -fstrong-eval-order=all

2020-05-21 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95221

Jason Merrill  changed:

   What|Removed |Added

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

  1   2   3   4   5   6   7   8   9   10   >