[Bug c++/115187] [14/15 Regression] ICE when deleting temporary array

2024-05-22 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115187

Jason Merrill  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org

[Bug libstdc++/115126] New: TU-local entity exposures in libstdc++

2024-05-16 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115126

Bug ID: 115126
   Summary: TU-local entity exposures in libstdc++
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jason at gcc dot gnu.org
  Target Milestone: ---

I tried compiling this alternate minimal version of module std:

export module std;
extern "C++" {
  #include 
}

and got a bunch of errors about exposures ([basic.link]/14) , most of which I
think are correct and need to be fixed in the library.

Most are complaining about the __gthread functions which are declared 'static
inline'; uses of these in standard library headers already violate the ODR.

I also see:

/home/jason/s/gcc/x86_64-pc-linux-gnu/libstdc++-v3/include/shared_mutex:216:5:
error: ‘void std::__shared_mutex_pthread::unlock()’ references internal linkage
entity ‘int std::__glibcxx_rwlock_unlock(pthread_rwlock_t*)’

which seems like the same pattern as the __gthread functions.  I would think
all of the above would be fixed by changing 'static inline' to just 'inline'.

/home/jason/s/gcc/x86_64-pc-linux-gnu/libstdc++-v3/include/future:1516:7:
error: ‘template virtual
std::shared_ptr >
std::__future_base::_Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_reset()’
references internal linkage entity ‘template std::shared_ptr >
std::__create_task_state(_Fn&&, const _Alloc&)’

This looks like a typo; when __create_task_state was added in r196695, the
ChangeLog referred to it as a member of __future_base (for which declaring it
static would make sense), but it's actually a namespace-scope function. 
Presumably it always should have been inline instead of static, if it isn't
going to be a member.

In file included from
/home/jason/s/gcc/x86_64-pc-linux-gnu/libstdc++-v3/include/memory:78:
/home/jason/s/gcc/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/unique_ptr.h:1161:27:
error: ‘template constexpr const bool
std::__is_unique_ptr >’ references internal linkage
entity ‘template constexpr const bool std::__is_unique_ptr<_Tp>’

This last one seems like a compiler bug; the partial specialization is also
TU-local, so this shouldn't be an error.  Though the 'static' seems unnecessary
here as well.

[Bug c++/114935] [14/15 regression] Miscompilation of initializer_list in presence of exceptions since r14-1705-g2764335bd336f2

2024-05-14 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114935

--- Comment #5 from Jason Merrill  ---
Created attachment 58210
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58210=edit
attempt to reduce redundancy

A failed attempt to avoid duplicate array cleanups in this case.

[Bug c++/109753] [13/14/15 Regression] pragma GCC target causes std::vector not to compile (always_inline on constructor)

2024-05-08 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109753

--- Comment #16 from Jason Merrill  ---
Patch posted: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650439.html

[Bug c++/114935] [14/15 regression] Miscompilation of initializer_list in presence of exceptions since r14-1705-g2764335bd336f2

2024-05-03 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114935

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/114935] [14/15 regression] Miscompilation of initializer_list in presence of exceptions since r14-1705-g2764335bd336f2

2024-05-03 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114935

--- Comment #1 from Jason Merrill  ---
Without :

#include 

int as;
struct A {
  A(const char *) { ++as; }
  A(const A&) { ++as; }
  ~A() { --as; }
};

void __attribute__((noipa))
tata(std::initializer_list init)
{
  throw 1;
}

int
main()
{
  try { tata({ "foo","bar" }); }
  catch (...) { }

  if (as != 0) __builtin_abort ();
}



The problem is with the array EH cleanup handling: when we initialize an array
of a type with a non-trivial destructor, such as the backing array for the
initializer_list, we have a cleanup to destroy any constructed elements if a
later constructor throws.  But in this case the call to tata is still in that
region.  Without the r14-1705 change, we deal with that by disabling the array
cleanup in split_nonconstant_init, but with the change we don't go through
split_nonconstant_init and so we miss disabling the cleanup.

[Bug c++/114935] [14/15 regression] Miscompilation of initializer_list in presence of exceptions

2024-05-03 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114935

Jason Merrill  changed:

   What|Removed |Added

   Priority|P3  |P1
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Last reconfirmed||2024-05-03
   Target Milestone|--- |14.0
Summary|Miscompilation of   |[14/15 regression]
   |initializer_list in presence of   |initializer_list in presence of
   ||exceptions
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED

[Bug c++/56427] [C++11] template template parameter template parameter pack that depends on another parameter pack

2024-05-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56427
Bug 56427 depends on bug 114377, which changed state.

Bug 114377 Summary: [13 Regression] GCC crashes on an example of CTAD for alias 
templates
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114377

   What|Removed |Added

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

[Bug c++/114377] [13 Regression] GCC crashes on an example of CTAD for alias templates

2024-05-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114377

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #7 from Jason Merrill  ---
Fixed for 13.3/14.

[Bug c++/113706] c-c++-common/pr103798-2.c FAILs as C++

2024-05-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113706

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #13 from Jason Merrill  ---
Should be fixed now.

[Bug c++/88323] implement C++20 language features.

2024-05-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88323

--- Comment #3 from Jason Merrill  ---
I think the goal should be to declare C++20 support no longer experimental in
GCC 15, but I probably wouldn't change the default dialect just yet.

[Bug c++/114841] [P0522R0] partial ordering of template template parameters

2024-04-30 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114841

--- Comment #1 from Jason Merrill  ---
Matheus' suggested wording:

"When performing deduction such that both A and P are template template
params, and A is the template name of a template specialization,
instead of just deducing A in that case, we synthesize a new template
parameter from A, filling it's parameters with defaults coming from
their corresponding template specialization argument."

[Bug c++/114841] [P0522R0] partial ordering of template template parameters

2024-04-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114841

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-04-24
 Blocks||114840
 Ever confirmed|0   |1


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114840
[Bug 114840] [meta-bug] template template parameters

[Bug c++/114841] New: [P0522R0] partial ordering of template template parameters

2024-04-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114841

Bug ID: 114841
   Summary: [P0522R0] partial ordering of template template
parameters
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jason at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58029
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58029=edit
WIP patch against r8-7277-g515f874faf4562

In the 2016 CWG discussion of making P0522R0 actually work, I proposed the
adjustment that I implemented in r7-5537-g31bfc9b9dd65ec and drafted as

* X is an invented class template with the template parameter
list of A, including default arguments, except that during partial ordering
(14.5.6.2), for each non-parameter-pack template parameter of A, the
corresponding template parameter of X has a default argument which
is compatible with any other template-argument.

In a reply, Richard Smith noted that this would wrongly accept this example:

template struct match2;

template class t1,typename T>
struct match2, typename t1::type > { typedef int type; }; // #5

template class t2,typename T0,typename T1>
struct match2, typename t2::type > { typedef int type; }; //
#6 

template  struct Q { typedef int type; };
match2, int> m;

and indeed GCC still chooses #6, which is questionable since t1 cannot
reasonably be deduced to be both t2 and t2.

I worked on implementing this in 2017 but never finished.
His alternative suggestion was still to introduce a default argument, but
instead of having it match any other template argument, base the default on the
actual arguments, i.e. T1 or T0.  I worked on this for a while in 2017 but
didn't finish.  Now that Clang is implementing this
(https://github.com/llvm/llvm-project/pull/89807), it would be nice to finish
it up.

[Bug c++/114840] [meta-bug] template template parameters

2024-04-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114840

Jason Merrill  changed:

   What|Removed |Added

  Alias||c++-ttp
 Ever confirmed|0   |1
 CC||jason at gcc dot gnu.org
   Last reconfirmed||2024-04-24
 Status|UNCONFIRMED |NEW

[Bug c++/114840] New: [meta-bug] template template parameters

2024-04-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114840

Bug ID: 114840
   Summary: [meta-bug] template template parameters
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jason at gcc dot gnu.org
  Target Milestone: ---

Meta-bug for issues with C++ template template parameters.

[Bug c++/114460] [C++26] P3106R1 - Clarifying rules for brace elision in aggregate initialization

2024-04-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114460

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #2 from Jason Merrill  ---
This paper was intended to correct the specification of existing behavior, so
no compiler changes should be necessary, but we should verify that.

[Bug c++/90390] [CWG1996] incorrect list initialization behavior for references

2024-04-11 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90390

Jason Merrill  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
Summary|incorrect list  |[CWG1996] incorrect list
   |initialization behavior for |initialization behavior for
   |references  |references
 CC||jason at gcc dot gnu.org
 Status|NEW |ASSIGNED

--- Comment #3 from Jason Merrill  ---
This is https://wg21.link/cwg1996 ; I think this is a defect in the standard.

[Bug c++/111067] g++.dg/opt/icf{1,2,3}.C tests fail on darwin

2024-04-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111067

--- Comment #12 from Jason Merrill  ---
(In reply to Iain Sandoe from comment #11)
> SO I suppose the question is do we want to figure out why the opt is failing
> (knowing that if it succeeds that is a secondary issue) - or just
> dg-xfail-run-if for Darwin?

I think we can just disable icf1 on darwin, and not try to merge i and j.

It would be nice for icf[23] to work, since those don't involve
externally-visible symbols (or even names at all).  It would be good to
understand what is preventing the optimization in that case.

[Bug c++/111067] g++.dg/opt/icf{1,2,3}.C tests fail on darwin

2024-04-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111067

--- Comment #10 from Jason Merrill  ---
(In reply to Jonathan Wakely from comment #8)
> (In reply to Iain Sandoe from comment #7)
> > So I am actually asking if the extension actually has any useful meaning?
> 
> For non-darwin, yes, it requests the storage of two initializer lists to be
> merged (see the commit msg for r14-1500-g4d935f52b0d5c0).

Though that doesn't involve the attribute, and promoting init-lists to static
should work fine on darwin.

(In reply to Jonathan Wakely from comment #6)
> The question then is whether the attribute is supposed to be a non-binding
> request or not.
> 
> If it's a non-binding request then the test should be adjusted/unsupported
> for this target.

It is a non-binding request. And yes, if this optimization is problematic on
darwin, we should adjust the test.

[Bug c++/114562] [11/12/13/14 Regression] ICE when trying to bind rvalue reference to lvalue with comma operator and forwarding reference to pointer since r10-7410

2024-04-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114562

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++/114561] [11/12/13/14 Regression] Comma operator with forwarding reference to pointer raises invalid lvalue required error since r10-7410

2024-04-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114561

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++/114455] [C++26] P2748R5 - Disallow binding a returned reference to a temporary

2024-03-31 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114455

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++/109753] [13/14 Regression] pragma GCC target causes std::vector not to compile (always_inline on constructor)

2024-03-14 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109753

--- Comment #15 from Jason Merrill  ---
Created attachment 57706
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57706=edit
one approach

I tried just making implicit functions respect #pragma target, but that
regresses pr105306 due to seeming internal confusion over whether -Ofast or
#pragma optimize apply to the implicit ~C.  I haven't tracked that down yet.

[Bug c++/109753] [13/14 Regression] pragma GCC target causes std::vector not to compile (always_inline on constructor)

2024-02-14 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109753

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++/113706] c-c++-common/pr103798-2.c FAILs as C++

2024-02-14 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113706

--- Comment #10 from Jason Merrill  ---
Created attachment 57423
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57423=edit
patch for GCC 15

Here's a fix, but since this isn't a regression it can wait for stage 1.

[Bug c++/113706] c-c++-common/pr103798-2.c FAILs as C++

2024-02-14 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113706

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Target Milestone|14.0|15.0
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

[Bug c++/113706] c-c++-common/pr103798-2.c FAILs as C++

2024-02-13 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113706

Jason Merrill  changed:

   What|Removed |Added

  Component|tree-optimization   |c++
 CC||jason at gcc dot gnu.org

--- Comment #7 from Jason Merrill  ---
I think this is a front-end issue.

[Bug c++/113612] [13/14 Regression] ICE: SIGSEGV in get_template_info (pt.cc:378) or tree_check (tree.h:3611)

2024-02-13 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113612

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #7 from Jason Merrill  ---
Fixed for 13.3/14.

[Bug c++/113612] [13/14 Regression] ICE: SIGSEGV in get_template_info (pt.cc:378) or tree_check (tree.h:3611)

2024-02-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113612

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++/107291] [12/13/14 Regression] ICE in build_comparison_op, at cp/method.cc:1461 since r12-4202-g09d886e671f2230a

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107291

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #7 from Jason Merrill  ---
Fixed for 12.4/13.3/14.

[Bug c++/107291] [12/13/14 Regression] ICE in build_comparison_op, at cp/method.cc:1461 since r12-4202-g09d886e671f2230a

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107291

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/110084] [12/13/14 Regression] defaulted constexpr operator== causes crash

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110084

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed for 12.4/13.3/14.

[Bug c++/109359] [12/13 Regression] Compile-time rounding of double literal to float is incorrect with -frounding-math

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109359

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #14 from Jason Merrill  ---
Fixed for 12.4/13.3/14.0.

[Bug c++/111286] [12/13/14 Regression] ICE on functional cast empty brace-init-list to const array reference

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111286

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #7 from Jason Merrill  ---
Fixed for 12.4/13.3/14.0.

[Bug c++/109359] [12/13 Regression] Compile-time rounding of double literal to float is incorrect with -frounding-math

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109359

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/111286] [12/13/14 Regression] ICE on functional cast empty brace-init-list to const array reference

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111286

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++/109359] [12/13 Regression] Compile-time rounding of double literal to float is incorrect with -frounding-math

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109359

Jason Merrill  changed:

   What|Removed |Added

   Assignee|jason at gcc dot gnu.org   |unassigned at gcc dot 
gnu.org
 Status|ASSIGNED|NEW
Summary|[12/13/14 Regression]   |[12/13 Regression]
   |Compile-time rounding of|Compile-time rounding of
   |double literal to float is  |double literal to float is
   |incorrect with  |incorrect with
   |-frounding-math |-frounding-math

--- Comment #9 from Jason Merrill  ---
This seems to be fixed on trunk.  Jakub, can you bisect what fixed it?

[Bug c++/109359] [12/13/14 Regression] Compile-time rounding of double literal to float is incorrect with -frounding-math

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109359

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/113767] [11/12/13 Regression] Missing Destructor Call with goto and return value

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113767

Jason Merrill  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|ASSIGNED|RESOLVED

--- Comment #2 from Jason Merrill  ---
The fix on the branches is just to disable NRV in the presence of backward
goto, as the fix on the trunk was too involved to backport.

So this testcase no longer puts ss in the return slot in 11/12/13, but instead
returns a copy; the extra destructor call is for the copy.  It looks mismatched
because there's no user-defined copy constructor to add another "Cons" line;
adding that makes it look better.

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

[Bug c++/92407] Destruction of objects returned from functions skipped by goto

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92407

Jason Merrill  changed:

   What|Removed |Added

 CC||joerg.rich...@pdv-fs.de

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

[Bug c++/113767] [11/12/13 Regression] Missing Destructor Call with goto and return value

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113767

Jason Merrill  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug c++/113767] [11/12/13 Regression] Missing Destructor Call with goto and return value

2024-02-05 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113767

Jason Merrill  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2024-02-05
 Status|UNCONFIRMED |ASSIGNED

[Bug c++/110084] [12/13/14 Regression] defaulted constexpr operator== causes crash

2024-02-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110084

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 libstdc++/111948] subrange modifies a const size object

2024-02-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111948
Bug 111948 depends on bug 112439, which changed state.

Bug 112439 Summary: [13/14 Regression] Modification of a member overlapping 
with a [[no_unique_address]] member in the constructor is incorrectly rejected 
in constant evaluation since r13-160-g967cdbe6629653
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112439

   What|Removed |Added

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

[Bug c++/112439] [13/14 Regression] Modification of a member overlapping with a [[no_unique_address]] member in the constructor is incorrectly rejected in constant evaluation since r13-160-g967cdbe662

2024-02-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112439

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill  ---
Fixed for 13.3/14.

[Bug c++/113638] [13/14 Regression] Array bounds of variable templates are not correctly deduced from initializers since GCC13 inside a decltype/sizeof

2024-02-02 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113638

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #9 from Jason Merrill  ---
Fixed for 13.3/14.

[Bug c++/113360] [13/14 Regression] Truncated constexpr error messages with -std=c++23/26

2024-02-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113360

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++/112439] [13/14 Regression] Modification of a member overlapping with a [[no_unique_address]] member in the constructor is incorrectly rejected in constant evaluation since r13-160-g967cdbe662

2024-02-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112439

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/113638] [13/14 Regression] Array bounds of variable templates are not correctly deduced from initializers since GCC13 inside a decltype/sizeof

2024-02-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113638

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++/113531] [14 Regression] AddressSanitizer: stack-use-after-scope when iterating over initializer list since r14-1500-g4d935f52b0d5c0

2024-01-30 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113531

--- Comment #2 from Jason Merrill  ---
Reduced:

#include 

void f(int) { }

void g()
{
  for (auto i : { 1, 2, 3 })
f (i);
  f(42);
}

int main()
{
  g();
  g();
}

[Bug c++/113531] [14 Regression] AddressSanitizer: stack-use-after-scope when iterating over initializer list since r14-1500-g4d935f52b0d5c0

2024-01-30 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113531

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/112846] [14 Regression] nvptx: 'FAIL: g++.dg/abi/anon6.C -std=c++20 scan-assembler _Z5dummyIXtl8wrapper1IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_Edi9RightNameLd405ec00000000000EEEEEEvv'

2024-01-30 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112846

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed.  I assume you were seeing the issue on nvptx because it doesn't use
mangling aliases.

[Bug c++/112846] [14 Regression] nvptx: 'FAIL: g++.dg/abi/anon6.C -std=c++20 scan-assembler _Z5dummyIXtl8wrapper1IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_Edi9RightNameLd405ec00000000000EEEEEEvv'

2024-01-30 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112846

Jason Merrill  changed:

   What|Removed |Added

   Last reconfirmed||2024-01-30
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug c++/113451] [14 regression] 32-bit g++.dg/abi/mangle-regparm1a.C FAILs

2024-01-30 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113451

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/113451] [14 regression] 32-bit g++.dg/abi/mangle-regparm1a.C FAILs

2024-01-30 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113451

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Last reconfirmed||2024-01-30

[Bug c++/81271] gcc/cp/lex.c:116: wrong condition ?

2024-01-30 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81271

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #4 from Jason Merrill  ---
What tool did this warning come from?

[Bug c++/113544] [14 Regression] bogus incomplete type error with dependent data member in local class in generic lambda since r14-278

2024-01-29 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113544

Jason Merrill  changed:

   What|Removed |Added

 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Status|NEW |RESOLVED

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

[Bug c++/109227] coroutines: ICE in tree check: expected record_type or union_type or qual_union_type, have array_type in build_special_member_call, at cp/call.cc:11067

2024-01-25 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109227

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/113598] [11/12/13/14 Regression] GCC internal compiler error since r0-124275

2024-01-25 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113598

Jason Merrill  changed:

   What|Removed |Added

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

[Bug bootstrap/105688] GCC breaks build process if bootstrapping a downgraded GCC (was "GCC 11.3 doesn't build with the GNU gold linker (version 2.37-27.fc36) 1.16: libstdc++.so.6: version `GLIBCXX_3.

2024-01-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105688

Jason Merrill  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=87858

--- Comment #47 from Jason Merrill  ---
Also see https://gcc.gnu.org/legacy-ml/gcc/2012-06/msg00325.html for an
argument to stop adding the target libs to LD_LIBRARY_PATH entirely.

[Bug c++/113088] [12/13 Regression] Segmentation fault with empty try/catch following try/catch with returns + noexcept destructor

2024-01-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113088

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed for 12.4/13.3.

[Bug c++/103185] [11/12/13 Regression] ind[arr] is rejected when arr is an array prvalue

2024-01-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103185

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed for 11.5/12.4/13.3.

[Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52

2024-01-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #13 from Jason Merrill  ---
Fixed for 12.4/13.3.

[Bug bootstrap/105688] GCC breaks build process if bootstrapping a downgraded GCC (was "GCC 11.3 doesn't build with the GNU gold linker (version 2.37-27.fc36) 1.16: libstdc++.so.6: version `GLIBCXX_3.

2024-01-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105688

Jason Merrill  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=41818
 CC||jason at gcc dot gnu.org

--- Comment #46 from Jason Merrill  ---
The problematic line in the toplevel Makefile is

$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed
's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \

The patch for PR22340 moved this from POSTSTAGE1_HOST_EXPORTS to HOST_EXPORTS,
but didn't mention that in its ChangeLog.   Which extended this issue to stage1
builds as well.

The rationale for doing this at all seems to be in order to make a just-built
tool find the just-built shared libraries that it links agains, but this also
affects pre-built tools that link against other versions of the same libraries.

And it doesn't justify adding target libraries in stage1.

For bfd/opcodes, it would seem better to set LD_LIBRARY_PATH in exec-tool.in so
that it only affects those tools specifically.  But if the new gcc links
against shared libmpc and such, that won't work, since if we set
LD_LIBRARY_PATH for gcc it's also set for the other tools it calls.

A fix for various system binutils might be to use exec-tool.in to splice out
the build directory from LD_LIBRARY_PATH.  But again, that won't help with my
system gcc.

I'm not sure what the best approach is for stage2+, where you might need to
load the previous libstdc++ for just-built tools.  I guess the splicing in
exec-tool.in would cover that as well, and in that case we don't need to worry
about system gcc.

For the moment I think I'm just going to propose reverting that bit of the
PR22340 fix.

[Bug c++/113347] [12/13 Regression] ICE during gimplification building TVM since r13-8079-gd237e7b291ff52

2024-01-23 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113347

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/89237] Partial specialization incorrectly marked as ambiguous with sizeof(T) narrowing down to bool

2024-01-23 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89237

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #4 from Jason Merrill  ---
Created attachment 57198
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57198=edit
WIP

Some WIP for this PR.  But looking through IMPLICIT_CONV_EXPR unconditionally
breaks some testcases, and I don't want to spend any more time on this
non-regression in stage 4.

[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|12.0|14.0

--- Comment #7 from Jason Merrill  ---
Apparently I was confused, and my patch was also needed for the original
testcase.

[Bug c++/55004] [meta-bug] constexpr issues

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 111357, which changed state.

Bug 111357 Summary: [11/12/13/14 Regression] __integer_pack fails to work with 
values of dependent type convertible to integers in noexcept context
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111357

   What|Removed |Added

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

[Bug c++/111357] [11/12/13/14 Regression] __integer_pack fails to work with values of dependent type convertible to integers in noexcept context

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111357

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #14 from Jason Merrill  ---
The library pattern is fixed on all branches; the built-in doesn't need to be.

[Bug c++/113498] [14 regression] ICE in GCC trunk: tree check: have using_decl in get_template_info, at cp/pt.cc:357 since r14-6064

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113498

Jason Merrill  changed:

   What|Removed |Added

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

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

[Bug c++/87724] gcc allows narrowing conversions in converted constant expressions

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87724

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #2 from Jason Merrill  ---
The standard has been corrected by P1401 to allow these conversions.

[Bug c++/95564] GCC rejects lambda expression with "noexcept(1+1)"

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95564

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill  ---
(In reply to Jiang An from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > GCC is inconsitent here. with static_assert and constexpr GCC accepts it (PR
> > 87724) while rejects it for noexcept.
> 
> Currently narrowing conversions are still forbidden in noexcept and explicit
> specifiers.
> 
> The inconsistency is acknowledged in C++23 (WG21-P1401R5), but it seems that
> P1401 is not a DR, as the related CWG 2320 is closed as extension. I don't
> know whether we should reject narrowing conversions in static_assert/if
> constexpr in earlier modes.

Narrowing conversions were fine in earlier standards, it was an accidental
change that made them ill-formed, which was fixed.

Clang now also rejects the testcase.

[Bug c++/104594] narrowing of -1 to unsigned char not detected with requires concepts

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104594

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |14.0
   Assignee|ppalka at gcc dot gnu.org  |jason at gcc dot gnu.org

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

[Bug c++/67898] rejects-valid on overloaded function as non-type template argument of dependent type

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67898

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
The original testcase was indeed fixed by the patch for 61355, and Patrick's
unrelated testcase in comment 4 is fixed by my commit just now.  Closing as
fixed in 12, but that only applies to the original testcase.

[Bug c++/112632] [14 Regression] Non-type template parameter created with converting constructor sometimes has original type

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112632

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #3 from Jason Merrill  ---
Fixed for GCC 14.

[Bug c++/112594] Non-type template parameter created with converting constructor sometimes has original type

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112594

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #4 from Jason Merrill  ---
Fixed for GCC 14.

[Bug c++/113498] [14 regression] ICE in GCC trunk: tree check: have using_decl in get_template_info, at cp/pt.cc:357 since r14-6064

2024-01-19 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113498

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/112632] [14 Regression] Non-type template parameter created with converting constructor sometimes has original type

2024-01-17 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112632

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/113307] fails to diagnose an explicit object parameter to be a function parameter pack

2024-01-16 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113307

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|--- |14.0
 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

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

[Bug libgcc/113403] __builtin_nested_func_ptr_created, __builtin_nested_func_ptr should be dynamically linked by default

2024-01-15 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113403

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #6 from Jason Merrill  ---
This seems somewhat similar to the C++ issue that led to introducing
STB_GNU_UNIQUE; a DSO keeping its own copy of something that we want to be
shared.  In the C++ case we were dealing with vague linkage variables that we
have no control over, and decided that the first copy that gets loaded is used
by all later DSOs, and so it can never be unloaded.

Here, we have more control over the definition, and could say that everyone
should get it from libgcc_s, as Jakub proposes.  Or we could force it to be
defined in the executable, so all DSOs will use the copy there.

That latter might be another way to handle the STB_GNU_UNIQUE situation: if an
executable links against a shared library that defines something
STB_GNU_UNIQUE, copy the definition from the library into the executable?  That
would avoid the dlclose problem.

[Bug c++/113038] [14 regression] Excess errors for g++.dg/modules/hello-1_b.C after r14-6569-gfe54b57728c09a

2024-01-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113038

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
But the regression is fixed.

[Bug c++/103524] [meta-bug] modules issue

2024-01-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
Bug 103524 depends on bug 113038, which changed state.

Bug 113038 Summary: [14 regression] Excess errors for 
g++.dg/modules/hello-1_b.C  after r14-6569-gfe54b57728c09a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113038

   What|Removed |Added

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

[Bug c++/113038] [14 regression] Excess errors for g++.dg/modules/hello-1_b.C after r14-6569-gfe54b57728c09a

2024-01-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113038

--- Comment #5 from Jason Merrill  ---
Created attachment 57053
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57053=edit
second piece

and an accompanying patch to allow P1811 redefinition of classes.  I think we
need to extend this to all redefinitions, especially with -fno-module-lazy

[Bug c++/113038] [14 regression] Excess errors for g++.dg/modules/hello-1_b.C after r14-6569-gfe54b57728c09a

2024-01-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113038

--- Comment #4 from Jason Merrill  ---
Created attachment 57052
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57052=edit
more general approach WIP for GCC 15

this is the beginning of a more general approach to this issue that also
handles P1811 include-after-import.  More work will be needed.

[Bug c++/53499] Incorrect partial ordering result with member vs non-member

2024-01-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53499

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #7 from Jason Merrill  ---
Fixed for GCC 14.

[Bug c++/81438] silent bad code generation with computed goto exit from catch block

2024-01-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81438

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #2 from Jason Merrill  ---
Diagnostic added for GCC 14.

[Bug c++/113191] [11/12/13/14 Regression] Incorrect overload resolution when base class function introduced with a using declaration is more constrained than a function declared in the derived class

2024-01-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113191

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|11.5|14.0
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #4 from Jason Merrill  ---
Fixed for GCC 14.  I don't think this is worth trying to change on release
branches.

[Bug c++/113124] g++ should relax designated initialiser rules for trivial classes (read: C structures) and C arrays.

2024-01-11 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113124

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2024-01-11
 CC||jason at gcc dot gnu.org

--- Comment #9 from Jason Merrill  ---
Doing this for constant initializers for C compatibility makes sense to me. 
But it isn't just a matter of adjusting the diagnostic, we would also need to
actually do the sorting to make the initialization work.  Still probably not
that much work, but not trivial.

[Bug c++/113038] [14 regression] Excess errors for g++.dg/modules/hello-1_b.C after r14-6569-gfe54b57728c09a

2024-01-11 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113038

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++/113298] RFE: allow suppressing warnings for void * conversions with -fpermissive

2024-01-10 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113298

--- Comment #4 from Jason Merrill  ---
GCC trunk now lets us associate permerrors with a -W flag, so this would be
pretty trivial to do.  It's a matter of adding an option to c-family/c.opt and
doc/invoke.texi and changing the relevant permerror call to permerror_opt.

[Bug c++/113083] [14 Regression][arm] ICE in fold_convert_loc, at fold-const.cc:2602 since r14-5979-g99d114c15523e0

2024-01-10 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113083

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #5 from Jason Merrill  ---
(In reply to Marek Polacek from comment #4)
> I wonder if we should refuse to evaluate A::A (this) (returning a pointer)
> into {} (not a pointer).

If the constructor returns a pointer, instead of maybe_constant_value
evaluating A::A (this) to (*this = {}), perhaps it should become (*this = {},
this)?

[Bug c++/106213] -Werror=deprecated-copy-dtor does not trigger warning and error

2023-12-21 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106213

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed for GCC 14.

[Bug middle-end/37722] destructors not called on computed goto

2023-12-20 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37722

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
 Status|UNCONFIRMED |RESOLVED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Target Milestone|--- |14.0
 Resolution|--- |FIXED

--- Comment #8 from Jason Merrill  ---
Warning and documentation added for GCC 14.

[Bug c++/105841] [12 Regression] Change in behavior of CTAD for alias templates

2023-12-20 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105841

Jason Merrill  changed:

   What|Removed |Added

   Target Milestone|12.4|13.0
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #14 from Jason Merrill  ---
This was a big enough change that I lean toward not backporting.

[Bug c++/92407] Destruction of objects returned from functions skipped by goto

2023-12-20 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92407

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #12 from Jason Merrill  ---
Fixed for 11.5/12.4/13.3/14.

[Bug c++/92145] -Wdeprecated-copy false-positive when inheriting base assignment operators

2023-12-20 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92145

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed for 11.5/12.

[Bug c++/105221] [11/12 Regression] gcc rejects true ? [](auto) noexcept {} : [](int) {} in C++17+ (works for C++14) since r7-4383-g51dc660315ef83dc

2023-12-20 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105221

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
   Target Milestone|11.5|13.0
 Resolution|--- |FIXED

--- Comment #9 from Jason Merrill  ---
Fixed in 13.  The fix seems a bit risky for backporting, but I'm open to it if
there's any interest.

[Bug c++/83264] std::initializer_list with a single element selects the wrong overload

2023-12-20 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83264

--- Comment #14 from Jason Merrill  ---
Pinged CWG again.

[Bug c++/41727] partial specialization of member template of instantiation doesn't work

2023-12-20 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41727

Jason Merrill  changed:

   What|Removed |Added

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

  1   2   3   4   5   6   7   8   9   10   >