[Bug c++/120052] New: internal compiler error: in scan_omp_1_op, at omp-low.cc:4005

2025-05-01 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- UBSan + OpenMP ICE C-Vise reduced test case, compile with -fsanitize=undefined -fopenmp. void copy_n(int, long, int); unsigned

[Bug c++/120015] New: internal compiler error: in unify, at cp/pt.cc:25969

2025-04-29 Thread ldalessandro at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Invalid code uses tag without a second parameter. template struct tag {}; template bool foo(tag); tag x; auto y = foo(x); Works for

[Bug c++/100553] [constexpr] new/delete matching fails when ref-counted pointers are stored in arrays

2025-03-07 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100553 --- Comment #2 from Luke Dalessandro --- This still fails in 14.2 but looks like it's been resolved in trunk (15?).

[Bug target/80878] -mcx16 (enable 128 bit CAS) on x86_64 seems not to work on 7.1.0

2025-02-20 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878 --- Comment #48 from Luke Dalessandro --- (In reply to LIU Hao from comment #47) > (In reply to Luke Dalessandro from comment #46) > > But if 104688 isn't related to this issue, and thus Jakub's comment was in > > error, I definitely don't under

[Bug target/80878] -mcx16 (enable 128 bit CAS) on x86_64 seems not to work on 7.1.0

2025-02-20 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878 --- Comment #46 from Luke Dalessandro --- (In reply to Xi Ruoyao from comment #45) > (In reply to Luke Dalessandro from comment #44) > > Now that https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104688 was resolved is > > it possible to actually get

[Bug target/80878] -mcx16 (enable 128 bit CAS) on x86_64 seems not to work on 7.1.0

2025-02-20 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878 Luke Dalessandro changed: What|Removed |Added CC||ldalessandro at gmail dot com

[Bug c++/118767] New: [ICE] internal compiler error: segmentation fault when using more than one placeholder "_" during destructuring in range-based-for loop

2025-02-05 Thread ldalessandro at gmail dot com via Gcc-bugs
Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following gives a uninfor

[Bug c++/108563] [12 Regression] [concepts] ICE (segfault) when requiring sizeof(variable_tempalate_v) since r10-7441-ga7ea3d2ced786c45

2024-07-19 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108563 --- Comment #5 from Luke Dalessandro --- Just checked again, this seems to be resolved in the 13 and 14 lines, as well as trunk. Still fails in 12.4.0.

[Bug c++/115181] New: [ICE] internal compiler error in invalid_tparm_referent_p, at cp/pt.cc:7274

2024-05-21 Thread ldalessandro at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Attempting to use an array literal as an NTTP. ``` template struct foo{}; foo<(int[]){1}> x; ```

[Bug c++/93008] Need a way to make inlining heuristics ignore whether a function is inline

2024-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93008 --- Comment #15 from Luke Dalessandro --- (In reply to Jonathan Wakely from comment #5) > > IMO the ideal solution is for GCC to stop using whether a function is inline > as an optimisation hint. Then we wouldn't need some extra GCC-specific wa

[Bug c++/114142] New: [coroutines]: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have reference_type in lookup_base, at cp/search.cc:252

2024-02-27 Thread ldalessandro at gmail dot com via Gcc-bugs
cp/search.cc:252 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone

[Bug c++/113844] New: inline namespace lookup ambiguity for using

2024-02-08 Thread ldalessandro at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- namespace a { inline namespace b { inline int b{}; } } using namespace a::b; // gcc & msvc & edg reject, clang accepts I think that

[Bug c++/110256] New: passing concept to concept compiles

2023-06-14 Thread ldalessandro at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- I accidentally passed a concept to convertible_to and was surprised to see it compile. ``` #include template concept b = requires (T t ) { { auto(t) } -> std::convertible

[Bug c++/109751] boost iterator_interface fails concept check starting in gcc-13

2023-05-08 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751 --- Comment #16 from Luke Dalessandro --- (In reply to Luke Dalessandro from comment #15) > Thanks for looking at this. > [...] > > Also, from what I understand, I should report Andrew's reduced case as a bug > in clang, and msvc (and maybe nvc

[Bug c++/109751] boost iterator_interface fails concept check starting in gcc-13

2023-05-06 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751 --- Comment #15 from Luke Dalessandro --- Thanks for looking at this. I'd like to report it back to boost as an issue, but I want to make sure I understand what to tell them. 1. The error produce by Andrew's reduction ("error: satisfaction of a

[Bug c++/109751] boost iterator_interface fails concept check starting in gcc-13

2023-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751 --- Comment #8 from Luke Dalessandro --- (In reply to Andrew Pinski from comment #7) > I think the error message is correct. > > In the original code we have: > ``` > ... > template > concept incrementable = regular<_Iter> && requires(_It

[Bug c++/109751] boost iterator_interface fails concept check starting in gcc-13

2023-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751 --- Comment #5 from Luke Dalessandro --- Ah, I didn't realize that. If you want to close one of the two issues that's fine with me. I sort of thought two different things were going on.

[Bug c++/109752] [ICE] in check_complete_insertion, at hash-table.h:578

2023-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109752 --- Comment #4 from Luke Dalessandro --- (In reply to Andrew Pinski from comment #2) > (In reply to Luke Dalessandro from comment #0) > > > > PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108451 fails the same > > assert but I don't know if

[Bug c++/109751] boost iterator_interface fails concept check starting in gcc-13

2023-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751 --- Comment #3 from Luke Dalessandro --- One thing to note about this failure, the concept evaluation changes in gcc-13. The when I try with current trunk it actually ICEs in addition. I reported that ICE as https://gcc.gnu.org/bugzilla/show_bu

[Bug c++/109752] [ICE] in check_complete_insertion, at hash-table.h:578

2023-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109752 --- Comment #3 from Luke Dalessandro --- Created attachment 55010 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55010&action=edit Preprocessed source copied from the godbolt live link.

[Bug c++/109751] boost iterator_interface fails concept check starting in gcc-13

2023-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751 --- Comment #2 from Luke Dalessandro --- Created attachment 55009 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55009&action=edit Preprocessed source copied from the godbolt live link included in the original text.

[Bug c++/109752] New: [ICE] in check_complete_insertion, at hash-table.h:578

2023-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following example is reduced from https://github.com/boostorg/stl_interfaces/blob/boost-1.82.0/example/node_iterator.cpp. It causes the ICE on trunk (gcc-14

[Bug libstdc++/109751] New: boost interface_interface fails concept check starting in gcc-13

2023-05-05 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following example is reduced from https://github.com/boostorg/stl_interfaces/blob/boost-1.82.0/example/node_iterator.cpp

[Bug c++/109136] New: [concepts] initializer_list constructor constraint should require static_cast for explicit conversion operator

2023-03-14 Thread ldalessandro at gmail dot com via Gcc-bugs
: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following concept should fail the static_assert, but passes (I

[Bug c++/108736] New: pconcepts] multidimensional subscript operator reports invalid error in requires test

2023-02-08 Thread ldalessandro at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following code produces an error when evaluating the concept. auto foo(auto a, auto... i) -> declt

[Bug c++/108669] missing error when std::vector of incomplete type has member referenced

2023-02-03 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108669 --- Comment #3 from Luke Dalessandro --- (In reply to Jonathan Wakely from comment #2) > (In reply to Luke Dalessandro from comment #0) > > This should run afoul of the second half of > > https://eel.is/c++draft/vector#overview-4. "T shall be co

[Bug c++/108669] New: [diagnostic] std::vector of incomplete type has member referenced

2023-02-03 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- In the following code example, I perform a value initialization of a std::vector of incomplete type. - #include struct B

[Bug c++/108563] New: [concepts] ICE (segfault) when requiring sizeof(variable_tempalate_v)

2023-01-26 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following valid code causes an ICE (segfault) template struct foo { static constexpr int value = 0

[Bug c++/106086] New: ICE: trying to capture 'this' in instantiation of generic lambda

2022-06-25 Thread ldalessandro at gmail dot com via Gcc-bugs
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Following code generates ICE #include #include #include template struct foo { cons

[Bug c++/106084] New: using constructor fails to inherit consteval

2022-06-24 Thread ldalessandro at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following code sample fails to compile with gcc. struct base { consteval base() {} }; struct child : base { using base::base

[Bug c++/106040] New: gcc reports error in aggregate when member has explicit constructor

2022-06-20 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- gcc fails to compile the following example, as it seems to be treating .i{0} as an implicit operation rather than an explicit

[Bug c++/106026] ICE: error reporting routines re-entered.

2022-06-18 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106026 --- Comment #1 from Luke Dalessandro --- Actually, I take back the part about it being invalid code, I'm not sure it's invalid. The godbolt link compiles on clang-14 without error.

[Bug c++/106026] New: ICE: error reporting routines re-entered.

2022-06-18 Thread ldalessandro at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Created attachment 53163 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53163&action=edit Eric's tag_invoke implementation. Triggered with complicate

[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114

2022-06-09 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 --- Comment #1 from Luke Dalessandro --- Somewhat reduced testcase: template struct A {}; template struct B {}; template static consteval auto operator~(A) -> B { return {}; } A<'i'> i; template au

[Bug c++/105912] New: internal compiler error: in extract_call_expr, at cp/call.cc:7114

2022-06-09 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Created attachment 53113 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53113&action=edit output from -freport-bug

[Bug c++/104177] coroutine frame is not being allocated with the correct alignment

2022-01-28 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104177 --- Comment #14 from Luke Dalessandro --- Thanks for the information Iain. Is there something short-term where gcc could provide an "unimplemented" failure or warning diagnostic for requests for coroutine frames with extended alignment? This

[Bug c++/104177] [diagnostic] basic.align#9 should emit diagnostic for unsupported alignas

2022-01-21 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104177 --- Comment #4 from Luke Dalessandro --- Oh, that would be great. I tried relatively hard to find a bug like that, but I have previously shown a surprising level of incompetence with bugzilla search.

[Bug c++/104177] [diagnostic] basic.align#9 should emit diagnostic for unsupported alignas

2022-01-21 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104177 --- Comment #1 from Luke Dalessandro --- Also described in https://stackoverflow.com/questions/66546906/is-it-defined-behavior-to-place-exotically-aligned-objects-in-the-coroutine-stat.

[Bug c++/104177] New: [diagnostic] basic.align#9 should emit diagnostic for unsupported alignas

2022-01-21 Thread ldalessandro at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Created attachment 52264 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52264&action=edit Downloaded CE examp

[Bug c++/100557] [ICE] Internal compiler error: Error reporting routines re-entered.

2021-10-05 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100557 --- Comment #2 from Luke Dalessandro --- Still failing in trunk, here's a CE link to the preprocessed source https://godbolt.org/z/YPfTGnT5f.

[Bug c++/93320] internal compiler error: in is_base_type, at dwarf2out.c:12987

2021-09-30 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93320 Luke Dalessandro changed: What|Removed |Added CC||ldalessandro at gmail dot com

[Bug other/97911] [11 regression] make install issue undefined reference to std::__throw_bad_array_new_length after r11-5142

2021-09-27 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97911 Luke Dalessandro changed: What|Removed |Added CC||ldalessandro at gmail dot com

[Bug c++/102418] New: [concepts] prefer iterator to range concept failures in ranges (QoI)

2021-09-20 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- When interacting with the ranges library I am occasionally presented with hundreds of lines of circuitous concept failures driven

[Bug c++/102286] [constexpr] construct_at incorrectly starts union array lifetime in some cases

2021-09-10 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102286 --- Comment #2 from Luke Dalessandro --- Okay, one last simplification for posterity. constexpr void bar() { union { int data[1]; } u; std::construct_at(u.data, 0); } https://godbolt.org/z/r4M3voh6W

[Bug c++/102286] [constexpr] construct_at incorrectly starts union array lifetime in some cases

2021-09-10 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102286 --- Comment #1 from Luke Dalessandro --- Oops, slightly reduced testcase, don't think the struct is necessary (just part of my RL code). union U { int data[1]; constexpr U() {} // no active member }; constexpr bool

[Bug c++/102286] New: [constexpr] construct_at incorrectly starts union array lifetime in some cases

2021-09-10 Thread ldalessandro at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Given the following struct and union, struct Foo { constexpr explicit Foo(int) {} }; union U

[Bug c++/101155] New: comparing non-capturing lambdas is not constexpr

2021-06-21 Thread ldalessandro at gmail dot com via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- I think the following function pointer comparison should be constexpr. ``` auto a = []{}; auto b = []{}; static_assert(a != b); // error: '(::_FUN != ::_FUN)'

[Bug c++/82632] copy deduction candidate erroneously preferred over deduction-guide

2021-06-19 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82632 Luke Dalessandro changed: What|Removed |Added CC||ldalessandro at gmail dot com

[Bug c++/101051] New: [ICE] in splice_late_return_type, at cp/pt.c:29738

2021-06-13 Thread ldalessandro at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Following invalid code triggers ICE in 10, 11, and trunk. ``` template class Foo { constexpr operator T() -> T {} }; ```

[Bug c++/100557] [ICE] Internal compiler error: Error reporting routines re-entered.

2021-05-11 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100557 --- Comment #1 from Luke Dalessandro --- Created attachment 50796 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50796&action=edit Preprocessed source (bzipped for size)

[Bug c++/100557] New: [ICE] Internal compiler error: Error reporting routines re-entered.

2021-05-11 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Not sure if this duplicates https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90747. /home/ldalessa/open/ttl20/include/ttl/cpos.hpp

[Bug c++/100553] New: [constexpr] new/delete matching fails when ref-counted pointers are stored in arrays

2021-05-11 Thread ldalessandro at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Sorry about the complexity of this test case. Consider the following code. ``` #include struct Node { int

[Bug c++/100495] constexpr virtual destructor incorrectly reports memory leak

2021-05-09 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100495 --- Comment #2 from Luke Dalessandro --- It's also possible to workaround this with array allocation. ``` struct Foo { constexpr virtual ~Foo() {} }; constexpr bool foo() { Foo *ptr = new Foo[1]{}; delete [] ptr; return true; }

[Bug c++/100495] constexpr virtual destructor incorrectly reports memory leak

2021-05-09 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100495 --- Comment #1 from Luke Dalessandro --- A short-term workaround for this appears to be explicit allocator usage (works back at least to 10.2). ``` #include struct Foo { constexpr virtual ~Foo() {} }; constexpr bool foo() { std::allo

[Bug c++/100495] New: constexpr virtual destructor incorrectly reports memory leak

2021-05-09 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- When using a constexpr virtual destructor gcc fails to match delete with corresponding new. ``` struct Foo { constexpr virtual ~Foo

[Bug c++/93413] Destructor definition not found during constant evaluation

2021-04-23 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93413 Luke Dalessandro changed: What|Removed |Added CC||ldalessandro at gmail dot com

[Bug c++/99963] [11 Regression] [concepts] template vs concept auto reports ambiguous overload

2021-04-15 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99963 --- Comment #3 from Luke Dalessandro --- I understand. Thank you (I've forwarded this on to clang, which _does_ accept the ambiguous form).

[Bug c++/100055] New: ICE on invalid requires expression

2021-04-12 Thread ldalessandro at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The following invalid code triggers a segfault. ``` void foo(auto&& arg) requires({}); :1:30: error: statement-expressions are not allowed outside functions nor in

[Bug c++/99963] New: [concepts] template vs concept auto reports ambiguous overload

2021-04-07 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Consider the following code (https://godbolt.org/z/h1bz1qxan). #include struct A{}; struct B : A {}; template concept is_a = std

[Bug c++/99885] New: CTAD fails for auto const& NTTP

2021-04-02 Thread ldalessandro at gmail dot com via Gcc-bugs
t: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Following (much-reduced) code causes a CTAD failure in gcc but not clang (https://godbolt.org/z/zWhWGj7PE) with both C++17 and C++20. template struct Foo {}; template struct

[Bug c++/99859] constexpr evaluation with member function is incorrect

2021-03-31 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99859 --- Comment #1 from Luke Dalessandro --- It was pointed out that it _also_ works if I change > static_assert(foo()); to > constexpr bool b = foo(); > static_assert(b); static_assert(foo());

[Bug c++/99859] New: constexpr evaluation with member function is incorrect

2021-03-31 Thread ldalessandro at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- I'm at a loss for how to describe this. I have an intrusive reference counting smart pointer that manipulates the pointed-to object's `count_` mem

[Bug c++/99059] Static inline variable can't refer to itself

2021-02-20 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99059 --- Comment #2 from Luke Dalessandro --- Ran into this in a static constexpr initializer, not really a workaround for it that I can find.

[Bug c++/97790] constexpr evaluation reports false positive memory leak

2020-11-10 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97790 --- Comment #1 from Luke Dalessandro --- It is possible to workaround this bug by creating a symbol for the offending allocation in the IILE. https://godbolt.org/z/jeoEra ``` struct vector { int *data; int n; constexpr vector() :

[Bug c++/97790] New: constexpr evaluation reports false positive memory leak

2020-11-10 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The constexpr evaluator seems to lose track of dynamic allocations in some contexts, resulting in false-positive leaks and rejected valid code

[Bug c++/96115] Char literal, decays to a pointer when passed to function pointer

2020-11-03 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96115 Luke Dalessandro changed: What|Removed |Added CC||ldalessandro at gmail dot com

[Bug c++/97681] noinline attribute ignored on constexpr function

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97681 --- Comment #5 from Luke Dalessandro --- The more I think about this the more it bothers me. I recognize that it might be very difficult to implement in gcc's infrastructure, but I think the design decision that "if it _can_ be constant evaluat

[Bug c++/97681] noinline attribute ignored on constexpr function

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97681 --- Comment #4 from Luke Dalessandro --- There are other occurrences of `a` that _are_ in `constexpr` context, it is used in both contexts within the application thus the keyword is necessary. This report came from a testcase reduction, so I'll

[Bug c++/97681] noinline attribute ignored on constexpr function

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97681 --- Comment #2 from Luke Dalessandro --- Okay, how would one constrain such inlining in order to retain a symbol and stack frame for debugging purposes?

[Bug c++/97681] New: noinline attribute ignored on constexpr function

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- GCC inlines function marked noinline when the function is marked as `constexpr`, even if it is not used in `constexpr` context. https://godbolt.org/z/b94Kje ``` [[gnu

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #7 from Luke Dalessandro --- Thank you, sorry for the confusion.

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #5 from Luke Dalessandro --- Ugh... replying to myself. > You can do Foo foo = Foo(); and it compiles. >> 1. I can't do `Foo foo = Foo();` because the purpose of the union is to >> allocate uninitialized storage for the `Foo` durin

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-02 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #4 from Luke Dalessandro --- Hi Jakob, Thank you for looking at this. I restructured the code sample according to your suggestions and it is available here https://godbolt.org/z/P1bMEz. I don't understand a couple of things that you

[Bug c++/97665] constexpr union array member incorrectly rejected as non-constexpr

2020-11-01 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97665 --- Comment #1 from Luke Dalessandro --- (In reply to Luke Dalessandro from comment #0) > GCC currently rejects the following code snippet, where it infers the > constexpr definition of V as non-constexpr. The definition of `v`, not the type `V

[Bug c++/97665] New: constexpr union array member incorrectly rejected as non-constexpr

2020-11-01 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- GCC currently rejects the following code snippet, where it infers the constexpr definition of V as non-constexpr. The monostate

[Bug c++/97664] New: constexpr evaluation incorrectly accepts non-constant destruction

2020-11-01 Thread ldalessandro at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- This one involves some language-lawyering, which is not my forte. While developing a constexpr, array-based vector that supports non

[Bug c++/97427] New: constexpr destructor for const object incorrectly rejected as modifying const object

2020-10-14 Thread ldalessandro at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- The destructor below is rejected (see https://godbolt.org/z/M8YxTY). Workaround for now is to mark n as mutable

[Bug c++/85576] A template union containing a friend function causes non-template type used as a template error

2020-10-08 Thread ldalessandro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85576 --- Comment #1 from Luke Dalessandro --- Just ran into this today while testing 11. https://godbolt.org/z/37G7P5 Any possibility we'll see a fix soon?

[Bug c++/97328] New: [ICE] internal compiler error: in verify_ctor_sanity, at cp/constexpr.c:3995

2020-10-07 Thread ldalessandro at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Following code causes ICE, but *ONLY* when explicitly passing `-std=c++20`. ``` template struct vector { union

[Bug c++/95422] New: Possible false positive for -Waddress-of-packed-member.

2020-05-29 Thread ldalessandro at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- I get some confusing results from the following code. https://godbolt.org/z/p5uZgH > struct [[ gnu::packed ]] Foo { > Foo

[Bug c++/92650] internal compiler error: canonical types differ for identical types

2019-11-24 Thread ldalessandro at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92650 --- Comment #1 from Luke Dalessandro --- x86-64 gcc (trunk) - cached #1 with x86-64 gcc (trunk) In file included from /opt/compiler-explorer/libs/rangesv3/trunk/include/range/v3/action/action.hpp:19, from /opt/compiler-explorer

[Bug c++/92650] New: internal compiler error: canonical types differ for identical types

2019-11-24 Thread ldalessandro at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- Created attachment 47349 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47349&action=edit test case Following code t

[Bug c++/90480] [8/9/10 Regression] ICE when calling operator() inside a lambda defined in a template class method

2019-11-22 Thread ldalessandro at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90480 --- Comment #3 from Luke Dalessandro --- Created attachment 47336 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47336&action=edit Testcast

[Bug c++/90480] [8/9/10 Regression] ICE when calling operator() inside a lambda defined in a template class method

2019-11-22 Thread ldalessandro at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90480 --- Comment #2 from Luke Dalessandro --- I'm hitting this with the following similar, but different snippet. Maybe it will help with this. #include struct Foo { int operator()(int i) { return 0; } template auto opera

[Bug c++/86875] internal compiler error: in tsubst_copy, at cp/pt.c:15478

2018-08-06 Thread ldalessandro at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86875 --- Comment #1 from Luke Dalessandro --- Created attachment 44515 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44515&action=edit Preprocessed source

[Bug c++/86875] New: internal compiler error: in tsubst_copy, at cp/pt.c:15478

2018-08-06 Thread ldalessandro at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ldalessandro at gmail dot com Target Milestone: --- ICE in 8.2 (Debian gcc package) when capturing `const` variable in y_combinator recursive lambda. This code works fine in 7.x. Capturing by