[Bug c++/95434] New: ICE for CTAD in generic lambda within variadic lambda

2020-05-29 Thread johelegp at gmail dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- The following snippet ICEs. See https://godbolt.org/z/-fZVX4. ```C++ template struct type { T value; }; template type(T) -> type; void f() { [] class...

[Bug c++/95434] ICE for CTAD in generic lambda within variadic lambda

2020-05-29 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95434 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/95454] New: type-level nodiscard not applied to constructors

2020-05-31 Thread johelegp at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- The following does not warn for constructors. See https://godbolt.org/z/BTZwew. ```C++ struct [[nodiscard]] X { int x; X operator+() const { return *this; } }; class

[Bug c++/95486] New: ICE for alias CTAD with non-dependent argument and constrained constructor

2020-06-02 Thread johelegp at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/cPWdGW. ```C++ template concept Auto = true; template struct X { constexpr X(const Auto auto

[Bug c++/95486] ICE for alias CTAD with non-dependent argument and constrained constructor

2020-06-02 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95486 --- Comment #2 from Johel Ernesto Guerrero Peña --- That commit added the feature I'm trying to use. I'd hope it's valid, or at least with this other constructor added: `constexpr X(U) {}`.

[Bug c++/95486] ICE for alias CTAD with non-dependent argument and constrained constructor

2020-06-02 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95486 --- Comment #3 from Johel Ernesto Guerrero Peña --- Having only the above unconstrained constructor works as expected, so I suppose it's valid. See https://godbolt.org/z/nMysB_. The actual use case doesn't currently have the unconstrained constru

[Bug c++/95568] New: No CTAD with list initialization within requires-clause

2020-06-07 Thread johelegp at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/Ljt-85. ```C++ template struct X { T x; }; template concept Y = requires { X{0}; }; ```

[Bug c++/95629] consteval operator== crashes compiler

2020-06-14 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95629 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/95735] New: ICE on invalid non-type template argument

2020-06-17 Thread johelegp at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/v7iLPn. ```C++ template requires requires { F(); } bool v{}; void f() { int x; static_assert(v); } ``` : In function 'void f()&#x

[Bug c++/95788] New: std::ranges::construct_at's placement new not intercepted

2020-06-20 Thread johelegp at gmail dot com
ormal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/diWS5T. ```C++ #include constexpr void f() { const int sz{1}; int* data{std::allocator{}.alloca

[Bug c++/95568] No CTAD with list initialization within requires-clause

2020-06-20 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95568 --- Comment #5 from Johel Ernesto Guerrero Peña --- (In reply to Marek Polacek from comment #2) > The problem seems to be not that we're in a require-clause but that we're in > a template, the following is also rejected: > > template struct X {

[Bug c++/95797] New: Can std::allocator.deallocate newed pointer during constant evaluation

2020-06-20 Thread johelegp at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/TxPbdC. ```C++ #include static_assert( (std::allocator{}.deallocate(new int[1], 1), true

[Bug c++/95806] New: Result of call with reference argument to newed object is cached during constant evaluation

2020-06-21 Thread johelegp at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/zzM-Qn. ```C++ #include constexpr bool is_zero(int& x) { return x

[Bug c++/95808] New: Can mismatch non-array new/delete with array new/delete during constant evaluation

2020-06-21 Thread johelegp at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/ZHiKmm. ```C++ constexpr void f() { delete[] new int; delete new int[1]; } constexpr

[Bug c++/95977] New: No deallocation of temporary in return-statement during constant evaluation

2020-06-29 Thread johelegp at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/iyRFxf. ```C++ struct X { int* x{new int{42}}; X() = default; constexpr X(const X&am

[Bug c++/95977] No deallocation of temporary in return-statement during constant evaluation

2020-06-29 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95977 --- Comment #1 from Johel Ernesto Guerrero Peña --- Slightly simplified: https://godbolt.org/z/9unpTF. ```C++ struct X { int* x{new int{42}}; constexpr ~X() { delete x; } }; constexpr int f() { return *X{}.x; } constexpr int z{f()}; ```

[Bug c++/96090] New: Inconsistent querying of differring exception specifications of explicitly defaulted functions

2020-07-06 Thread johelegp at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/SiGMyX. ```C++ #include using namespace std; struct yesthrow_t { yesthrow_t

[Bug c++/96193] New: No ADL for hidden friend in call with explicit template arguments

2020-07-14 Thread johelegp at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/qhEfGd. ```C++ struct B { template friend void f(B) { } }; void g() { f(B{}); } ```

[Bug c++/96193] No ADL for hidden friend in call with explicit template arguments

2020-07-14 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96193 --- Comment #1 from Johel Ernesto Guerrero Peña --- That actually compiles if I add -std=c++20. If the call is itself dependent, it fails to compile. See https://godbolt.org/z/KqGhKE. ```C++ template struct B { template friend void f(B)

[Bug c++/96193] No ADL for hidden friend in call with explicit template arguments

2020-07-14 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96193 --- Comment #3 from Johel Ernesto Guerrero Peña --- Yes! I left it out expecting it to be backported as an extension like Clang does.

[Bug d/96229] New: Invalid specialization accepted when also constrained in base template template parameter

2020-07-16 Thread johelegp at gmail dot com
/z/W1zh9n Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z

[Bug c++/96242] New: ICE conditionally noexcept defaulted comparison

2020-07-19 Thread johelegp at gmail dot com
: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/z4q4Tv. ```C++ template struct X { bool operator==(const X

[Bug c++/96256] New: Invalid consteval call not rejected

2020-07-20 Thread johelegp at gmail dot com
-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/zeEY96. ```C++ struct X

[Bug c++/96193] No ADL in dependent call with explicit template arguments

2020-07-24 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96193 Johel Ernesto Guerrero Peña changed: What|Removed |Added URL||https://godbolt.org/z/E64Pb

[Bug c++/95434] ICE for CTAD in generic lambda within variadic lambda

2020-08-11 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95434 --- Comment #3 from Johel Ernesto Guerrero Peña --- Another example: https://godbolt.org/z/Wq1vjP. Perhaps, this too requires another bug report. ```C++ template class T, class... Us> concept ctadable = requires(Us... us) { T{us...}; }; templat

[Bug c++/96790] New: Indirectly inherited default constructor doesn't zero-initialize

2020-08-25 Thread johelegp at gmail dot com
563e1 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- Se

[Bug c++/65816] Constructor delegation does not perform zero-initialization

2020-08-27 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65816 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/96790] Indirectly inherited default constructor doesn't zero-initialize

2020-08-27 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96790 Johel Ernesto Guerrero Peña changed: What|Removed |Added Keywords|rejects-valid |wrong-code Resolut

[Bug c++/96840] New: Recursive substitution in constrained commutative operator

2020-08-28 Thread johelegp at gmail dot com
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- I may be wrong, but I think this should compile. Clang accepts it as does GCC 10.2 and did the

[Bug c++/96510] Unexpected constexpr deallocation error after implicit conversion

2020-08-28 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96510 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/96242] ICE conditionally noexcept defaulted comparison

2020-09-05 Thread johelegp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96242 --- Comment #2 from Johel Ernesto Guerrero Peña --- Thank you, but am I not exempt? > The only excuses to not send us the preprocessed sources are [...] if you've > reduced the testcase to a small file that doesn't include any other file [...]

[Bug c++/86044] New: noexcept(false) of constexpr member function ignored

2018-06-04 Thread johelegp at gmail dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- In the following snippet, the assertion fails if `constexpr` isn't commented out. See https://godbolt.org/g/FCEHCb. ```C++ struct A { }; template str

[Bug c++/86105] New: Conversion to ambiguous/inaccessible rvalue base is valid in unevaluated context

2018-06-10 Thread johelegp at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- In the following snippet, the assertions fail although the `static_cast` is ill-formed in non-unevaluated context. See

[Bug c++/99365] New: ICE on partial specialization with constrained placeholder NTTP

2021-03-03 Thread johelegp at gmail dot com via Gcc-bugs
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/nxTEaW. ```C

[Bug c++/99366] New: Partial specialization with constrained placeholder NTTP is not more specialized

2021-03-03 Thread johelegp at gmail dot com via Gcc-bugs
Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone

[Bug c++/99365] [11 Regression] ICE on partial specialization with constrained placeholder NTTP

2021-03-07 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99365 --- Comment #6 from Johel Ernesto Guerrero Peña --- Thank you. Can confirm it's working for my use case.

[Bug c++/99493] New: Address of template parameter object is not a valid template argument

2021-03-09 Thread johelegp at gmail dot com via Gcc-bugs
Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See

[Bug c++/99501] New: Can't forward declare partial specialization of template with NTTP previously partially specialized

2021-03-09 Thread johelegp at gmail dot com via Gcc-bugs
https://godbolt.org/z/Mhnxrf Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail do

[Bug c++/99507] New: Can't return static address from immediate function

2021-03-09 Thread johelegp at gmail dot com via Gcc-bugs
words: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/vnPToT.

[Bug c++/99524] New: initializer_list storage considered a temporary when accessed through NTTP

2021-03-10 Thread johelegp at gmail dot com via Gcc-bugs
Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone

[Bug c++/95015] Partial specializations of class templates with class NTTP fails

2021-03-11 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95015 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/99565] New: Bogus identical branches warning when returning references to union members

2021-03-12 Thread johelegp at gmail dot com via Gcc-bugs
Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone

[Bug c++/99571] New: ICE for NTTP with pointer to array of union

2021-03-12 Thread johelegp at gmail dot com via Gcc-bugs
-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/rsc6fs. ```C++ struct

[Bug c++/83258] Rejecting function pointer non-type template parameter without linkage

2021-03-13 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83258 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/97700] Bogus error when a class containing a function pointer is used as a non-type template parameter

2021-03-13 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97700 --- Comment #3 from Johel Ernesto Guerrero Peña --- This seems to be a duplicate of Bug 83258.

[Bug c++/83258] Rejecting function pointer non-type template parameter without linkage

2021-03-13 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83258 --- Comment #10 from Johel Ernesto Guerrero Peña --- Another workaround, extended from Bug 92320's example. See https://godbolt.org/z/69onWf. You can wrap the closure object in a template function which itself invokes the closure object and conve

[Bug c++/97476] Use of NTTP placeholder checked for CTAD before instantiation

2021-03-14 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97476 Johel Ernesto Guerrero Peña changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolutio

[Bug c++/99586] New: Use of class template identifier checked for CTAD before instantiation

2021-03-14 Thread johelegp at gmail dot com via Gcc-bugs
Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See

[Bug c++/99493] Address of template parameter object is not a valid template argument

2021-03-14 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99493 --- Comment #1 from Johel Ernesto Guerrero Peña --- Slightly simplified: https://godbolt.org/z/rv97Gh. ```C++ struct A{}; templateconstexpr const A*tpo{&a}; templatestruct B{}; B>b; ``` ``` :4:10: error: the address of 'A{}' is not a valid templa

[Bug c++/99565] Bogus identical branches warning when returning references to union members

2021-03-15 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99565 --- Comment #2 from Johel Ernesto Guerrero Peña --- ``` : In member function 'int& A::x()': :6:23: warning: this condition has identical branches [-Wduplicated-branches] 6 | int& x() { return 0 ? a : b; } | ~~^

[Bug c++/99493] Address of template parameter object is not a valid template argument

2021-03-15 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99493 --- Comment #2 from Johel Ernesto Guerrero Peña --- Looks like you can get away by instead passing around a pointer to the address of the template parameter object: https://godbolt.org/z/o3Paz1. ```C++ struct A{}; templateconstexpr const A*tpo{&a

[Bug c++/99622] New: Materialized temporary is not usable in a constant expression

2021-03-16 Thread johelegp at gmail dot com via Gcc-bugs
: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https

[Bug c++/99631] New: decltype of non-type template-parameter shouldn't be const

2021-03-17 Thread johelegp at gmail dot com via Gcc-bugs
tatus: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See

[Bug c++/99631] decltype of non-type template-parameter shouldn't be const

2021-03-18 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99631 --- Comment #3 from Johel Ernesto Guerrero Peña --- Good point. How about 'conformance' for a keyword?

[Bug c++/96873] Internal compiler error in alias_ctad_tweaks

2021-04-06 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96873 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/99586] Use of class template identifier checked for CTAD before instantiation

2021-04-21 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99586 --- Comment #4 from Johel Ernesto Guerrero Peña --- Thank you.

[Bug c++/95486] ICE for alias CTAD with non-dependent argument and constrained constructor

2021-04-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95486 --- Comment #11 from Johel Ernesto Guerrero Peña --- Thank you. But the first CE link: https://godbolt.org/z/cPWdGW, and with the addition in Comment 2: https://godbolt.org/z/Gezh5h5W4, they still ICE.

[Bug c++/93085] ICE in get_class_binding_direct and alias_ctad_tweaks, with C++20 NTTP + CTAD + alias template

2020-10-17 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93085 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/97476] New: Use of NTTP placeholder checked for CTAD before instantiation

2020-10-17 Thread johelegp at gmail dot com via Gcc-bugs
: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See the URL

[Bug c++/93085] ICE in get_class_binding_direct and alias_ctad_tweaks, with C++20 NTTP + CTAD + alias template

2020-10-17 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93085 --- Comment #4 from Johel Ernesto Guerrero Peña --- > GCC shouldn't even be trying to resolve `foo<42>()` until `G` has been > instantiated. That's right. I came across this bug report when reporting such an issue: https://gcc.gnu.org/bugzilla/

[Bug libstdc++/95788] std::ranges::construct_at's placement new not intercepted

2020-10-08 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95788 --- Comment #3 from Johel Ernesto Guerrero Peña --- Thank you. Sorry for my laziness, but did you confirm this from the OP? > Other stuff in `bits/ranges_uninitialized.h` may be similarly affected.

[Bug c++/98486] New: Variable template specialization doesn't account for primary's constraints

2020-12-30 Thread johelegp at gmail dot com via Gcc-bugs
g/z/jon9ea Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/jo

[Bug c++/98832] New: CTAD fails for alias template of aggregate with specified undeducible template parameter

2021-01-25 Thread johelegp at gmail dot com via Gcc-bugs
/M1eqvq Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target

[Bug c++/98844] New: Deduction guides don't inhibit the aggregate deduction candidate

2021-01-26 Thread johelegp at gmail dot com via Gcc-bugs
Ws4rd Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: ---

[Bug c++/98924] New: Ambiguous name in concept-id diagnosed as parser error

2021-02-01 Thread johelegp at gmail dot com via Gcc-bugs
Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/Txrvos. ```C

[Bug c++/95486] ICE for alias CTAD with non-dependent argument and constrained constructor

2021-02-02 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95486 --- Comment #5 from Johel Ernesto Guerrero Peña --- Thank you. I was under the mistaken impression that the above was only a partial solution. Adding the following deduction guide restores the ICE. See https://godbolt.org/z/fej7WT. ```C++ templat

[Bug c++/95434] ICE for CTAD in generic lambda within variadic lambda

2021-02-02 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95434 Johel Ernesto Guerrero Peña changed: What|Removed |Added Known to work||11.0 Status|AS

[Bug c++/99141] New: Name of deduced type unchecked in deduction guide

2021-02-17 Thread johelegp at gmail dot com via Gcc-bugs
: accepts-invalid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- Context (https://timsong-cpp.github.io

[Bug c++/95486] ICE for alias CTAD with non-dependent argument and constrained constructor

2021-05-01 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95486 --- Comment #13 from Johel Ernesto Guerrero Peña --- You're right. I thought they were compiling against GCC trunk.

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

2023-03-04 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524 Bug 103524 depends on bug 102524, which changed state. Bug 102524 Summary: [modules] Missing diagnostic when an exported namespace is empty https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102524 What|Removed |Add

[Bug c++/102524] [modules] Missing diagnostic when an exported namespace is empty

2023-03-04 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102524 Johel Ernesto Guerrero Peña changed: What|Removed |Added Resolution|--- |FIXED Status|

[Bug c++/104993] New: [modules] Missing diagnostic when exporting using-directive

2022-03-20 Thread johelegp at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- [module.interface]p3s1 says > An exported declaration that is not a module-import-declaration shall decl

[Bug c++/100687] [modules, concepts] imported concept gives different result

2022-03-23 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100687 --- Comment #2 from Johel Ernesto Guerrero Peña --- Another use case (Clang: https://godbolt.org/z/hTPsPbEhe) (GCC: https://godbolt.org/z/96MqTvrKv): `mod.cpp`: ```C++ export module mod; export template inline constexpr bool is_same_v = false;

[Bug c++/102598] [modules] ICE in pp_string, at pretty-print.c

2022-03-23 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102598 --- Comment #2 from Johel Ernesto Guerrero Peña --- Another test case: https://godbolt.org/z/Gsfx56GM9.

[Bug c++/105044] New: [modules] ICE in comptypes, at cp/typeck.c:1529

2022-03-24 Thread johelegp at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/YGo78aPE8. `mod.cpp`: ```C++ export module mod; export template struct downcast_base { using

[Bug c++/105045] New: [modules] Can't deduce defaulted template parameter

2022-03-24 Thread johelegp at gmail dot com via Gcc-bugs
ormal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/3WMd4T48h. `mod.cpp`: ```C++ export module mod; export template void f(U) { } ``` `test.cpp`: ```C++ i

[Bug c++/105106] New: Dependent invocation with defaulted NTTP lambda fails

2022-03-30 Thread johelegp at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/obfY3Mdba: ```C++ template auto foo() { return l; } template auto bar() { return foo

[Bug c++/105106] Dependent invocation with defaulted NTTP lambda fails

2022-03-30 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105106 --- Comment #1 from Johel Ernesto Guerrero Peña --- There is implementation divergence in the resulting closure type(s): https://godbolt.org/z/W98r49o8s.

[Bug c++/106430] New: [modules] ICE on function result of imported type with user-declared constexpr destructor

2022-07-24 Thread johelegp at gmail dot com via Gcc-bugs
Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z

[Bug c++/106304] [modules] ICE compiling dynamic_cast in constexpr function (in tree_node, at cp/module.cc:9183)

2022-07-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106304 --- Comment #2 from Johel Ernesto Guerrero Peña --- This is the best I can do without having to manually de-noise CMake's compile commands: https://godbolt.org/z/6s1GGYhM4.

[Bug c++/106430] [modules] ICE on function result of imported type with user-declared constexpr SMF

2022-07-27 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106430 Johel Ernesto Guerrero Peña changed: What|Removed |Added Summary|[modules] ICE on function |[modules] ICE on function

[Bug c++/106485] New: Can't use heap pointer in `static_assert`

2022-07-30 Thread johelegp at gmail dot com via Gcc-bugs
ormal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/W4r6oMa3M. ```C++ struct I { int* i = new int{1}; constex

[Bug c++/106826] New: [modules] Variable template of type trait via importable header gives wrong result

2022-09-04 Thread johelegp at gmail dot com via Gcc-bugs
Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/Yjrcv6sG1. ```sh CXX=/home/johel/root/gcc/bin/g++ echo

[Bug c++/106826] [13 Regression] [modules] Variable template of type trait via importable header gives wrong result

2022-09-05 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106826 Johel Ernesto Guerrero Peña changed: What|Removed |Added Known to work||12.2.0 Known to fail

[Bug c++/106851] [modules] Name conflict for exported using-declaration

2022-09-06 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106851 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/106485] Can't use heap pointer in `static_assert`

2022-09-08 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106485 --- Comment #2 from Johel Ernesto Guerrero Peña --- I think that's different. Actually, I think it's Clang that's wrong. As mentioned at https://cpplang.slack.com/archives/C21PKDHSL/p1656857369259539?thread_ts=1656856509.892079&cid=C21PKDHSL: >

[Bug c++/106826] [13 Regression] [modules] Variable template of type trait via importable header gives wrong result

2022-09-21 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106826 --- Comment #3 from Johel Ernesto Guerrero Peña --- So this is a duplicate of Bug 100687.

[Bug c++/106826] [13 Regression] [modules] Variable template of type trait via importable header gives wrong result

2022-09-22 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106826 --- Comment #7 from Johel Ernesto Guerrero Peña --- Thank you very much! This was a real blocker.

[Bug c++/102284] Can access object outside of its lifetime during constant evaluation

2022-09-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102284 --- Comment #6 from Johel Ernesto Guerrero Peña --- Another example. Simplified: https://godbolt.org/z/z781c56PM. ```C++ struct ratio { int numerator; }; template struct constant; template concept constant_invocable = requires { typename c

[Bug c++/107033] New: [13 Regression] [modules] ICE converting to span

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See GCC trunk: https://godbolt.org/z/KoP5qo1Ks. See GCC 12: https://godbolt.org/z/EfGjdcYaW

[Bug c++/107033] [13 Regression] [modules] ICE converting to span

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107033 Johel Ernesto Guerrero Peña changed: What|Removed |Added Keywords||ice-on-valid-code Kn

[Bug c++/107033] [13 Regression] [modules] ICE converting to span

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107033 --- Comment #2 from Johel Ernesto Guerrero Peña --- Does it count as a regression if rejects-valid becomes ice-on-valid-code? IIRC, ~3 weeks ago the lvalue case was rejects-valid, like GCC12.

[Bug c++/107033] [13 Regression] [modules] ICE using span as a range

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107033 --- Comment #3 from Johel Ernesto Guerrero Peña --- Simplified: https://godbolt.org/z/3Ys316aeE. ```C++ export module mod; import "std.hpp"; int x[2]; export auto _ = std::ranges::begin(x); ```

[Bug c++/107033] [13 Regression] [modules] ICE using span as a range

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107033 --- Comment #4 from Johel Ernesto Guerrero Peña --- This is actually Bug 106826. Simplest: https://godbolt.org/z/oKT4x9r4G. ```C++ template constexpr bool is = false; template constexpr bool is = true; ``` ```C++ export module mod; import "st

[Bug c++/106826] [13 Regression] [modules] Variable template of type trait via importable header gives wrong result

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106826 --- Comment #8 from Johel Ernesto Guerrero Peña --- The original reproducer now ICEs. I opened Bug 107033 for this. The tests added in https://gcc.gnu.org/g:32d8123cd6ce87acb557aec230e8359051316f9f uses a named module. My reproducer uses an impo

[Bug c++/99631] decltype of non-type template-parameter shouldn't be const

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99631 --- Comment #5 from Johel Ernesto Guerrero Peña --- Would the existing 'wrong-code' work? > Generates incorrect code. Has to be able to compile and link.

[Bug c++/99631] decltype of non-type template-parameter shouldn't be const

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99631 --- Comment #6 from Johel Ernesto Guerrero Peña --- > But wrong-code isn't really right either [...] Oh, you already mentioned them. I suggest 'non-conforming-result', or something more appropriate than "result" to indicate the metaprogrammingne

[Bug c++/107045] New: [modules] ICE on use of std::vector from importable header

2022-09-26 Thread johelegp at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: johelegp at gmail dot com CC: johelegp at gmail dot com Target Milestone: --- See https://godbolt.org/z/qeGb9hhsf. ```sh CXX=g++ echo

[Bug c++/107045] [modules] ICE on use of std::vector from importable header

2022-09-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107045 --- Comment #1 from Johel Ernesto Guerrero Peña --- Minimal: https://godbolt.org/z/hxrPvPPhs. ```C++ namespace std { template struct X { friend void f(); }; } ``` ```C++ export module mod; import "std.hpp"; export std::X v; ```

[Bug c++/100134] [modules] ICE when using a vector in a module

2022-09-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100134 --- Comment #6 from Johel Ernesto Guerrero Peña --- See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107045#c1 for a minimal reproducer: Minimal: https://godbolt.org/z/hxrPvPPhs. ```C++ namespace std { template struct X { friend void f(); };

  1   2   3   >