gcc-bugs@gcc.gnu.org

2024-04-30 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114877 --- Comment #3 from Lénárd Szolnoki --- (In reply to Richard Biener from comment #2) > The standard says the results are unspecified, it doesn't say *p is written > to, > so I'm not sure there's a bug here. C17 (N2176) says in the library secti

gcc-bugs@gcc.gnu.org

2024-04-28 Thread leni536 at gmail dot com via Gcc-bugs
t: c Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- arch: x86_64 command line arguments: -std=c17 -O2 -pedantic-errors #include #include int frexp_test(bool b) { if (b) { int x; (void)frexp(NAN

[Bug c++/106371] Bogus narrowing conversion reported due to bitfield

2023-12-19 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106371 Lénárd Szolnoki changed: What|Removed |Added CC||leni536 at gmail dot com --- Comment

[Bug c++/111776] ICE on delete expression with multiple viable destroying operator delete

2023-11-15 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111776 --- Comment #3 from Lénárd Szolnoki --- The C++ standard currently doesn't specify what the behavior of these program snippets are. This is CWG2805. https://cplusplus.github.io/CWG/issues/2805.html

[Bug c++/111776] ICE on delete expression with multiple viable destroying operator delete

2023-10-13 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111776 --- Comment #2 from Lénárd Szolnoki --- Same ICE without destroying delete: ``` struct A { void operator delete(void *); }; struct B { void operator delete(void *); }; struct C : A, B { using A::operator delete; using B::opera

[Bug c++/111776] New: ICE on delete expression with multiple viable destroying operator delete

2023-10-11 Thread leni536 at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- version: gcc 13.2.0 flags: -std=c++20 -O2 -pedantic-errors ``` #include struct B { void operator delete(B* ptr, std

[Bug c++/111440] wrong-code for ternary with reference-compatible arguments due to C++ defect report 2352

2023-09-17 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111440 --- Comment #3 from Lénárd Szolnoki --- Note that GCC seems to implement CWG2352 outside of ternary operators. https://godbolt.org/z/rnMcPqE7b ``` template void foo(); bool bar() { int * ptr = nullptr; const int * const &ref = ptr;

[Bug c++/111440] New: wrong-code for ternary with reference-compatible arguments

2023-09-17 Thread leni536 at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- version: g++ 13.2.0 flags: -std=c++20 -O2 -pedantic-errors Consider the following code: ``` template void foo();, bool bar() { int

[Bug c++/111286] New: ICE on functional cast to const array reference

2023-09-04 Thread leni536 at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- With g++ 13.2.0 with flags: -std=c++20 The following code: ``` struct A { A() noexcept {} }; void foo() { using T = const A (&)[1]; T{}; } ``` Produces

[Bug c/102989] Implement C2x's n2763 (_BitInt)

2023-04-09 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102989 Lénárd Szolnoki changed: What|Removed |Added CC||leni536 at gmail dot com --- Comment

[Bug c/103343] Invalid codegen when comparing pointer to one past the end and then dereferencing that pointer

2021-11-22 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103343 --- Comment #4 from Lénárd Szolnoki --- A complete program example: f.h: ``` #pragma once extern int x[1]; extern int y; int f(int* p, int* q); ``` f.cpp: ``` #include "f.h" int f(int* p, int* q) { *q = y; if (p == (x + 1)) {

[Bug c++/103333] [accepts-invalid] function template argument deduction for incompatible 'transformed A' / 'deduced A' pair

2021-11-22 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10 --- Comment #1 from Lénárd Szolnoki --- This can be turned into wrong-code. C++11 example without includes: ``` template struct enable_if {}; template struct enable_if { using type = T; }; template using enable_if_t = typename enable_

[Bug c++/101486] New: Rejects valid qualification conversion involving array of unknown bound in function template argument [P0388]

2021-07-17 Thread leni536 at gmail dot com via Gcc-bugs
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- Version: g++ (Compiler-Explorer-Build-gcc-48e8a7a677b8356df946cd12fbb215538828e747-binutils

[Bug c++/100189] New: rejects valid conditional operators involving conversions to arrays of unknown bound (P0388)

2021-04-21 Thread leni536 at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- Version: g++ (Compiler-Explorer-Build) 12.0.0 20210420 (experimental) Flags: -std=c++20 -O2 -pedantic-errors

[Bug c++/98419] wrong code when destructor of local variable modifies returned object

2020-12-22 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98419 --- Comment #2 from Lénárd Szolnoki --- This is probably invalid, I wasn't aware of http://eel.is/c++draft/class.temporary#3 > When an object of class type X is passed to or returned from a function, if X > has at least one eligible copy or mov

[Bug c++/98419] New: wrong code when destructor of local variable modifies returned object

2020-12-22 Thread leni536 at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- Version: g++ (Compiler-Explorer-Build) 10.2.0 Command line options: -std=c++17 -O2 -pedantic-errors ``` struct A { int i

[Bug c++/98326] New: ICE: in create_tmp_var, at gimple-expr.c:482, converting stateless generic-lambda to function pointer

2020-12-16 Thread leni536 at gmail dot com via Gcc-bugs
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- version: g++ (Compiler-Explorer-Build) 10.2.0 arguments: -O2 -std=c++17 -pedantic

[Bug c++/98163] ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type.

2020-12-07 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98163 --- Comment #4 from Lénárd Szolnoki --- Other example in the same spirit, but not using array of unknown bound: ``` template struct S {}; template void foo(T) {} int i; constexpr const int& iref = i; template void foo(S); template void foo(

[Bug c++/98163] New: ICE symtab_node::verify failed, auto& NTTP specialized with same entity but different type.

2020-12-06 Thread leni536 at gmail dot com via Gcc-bugs
RMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- g++ (Compiler-Explorer-Build) 11.0.0 20201205 (experimental) command line flags: -std=c++17 -pedantic-er

[Bug c++/97645] Rejects valid subscript expression on array of unknown bound in constant expression

2020-12-05 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97645 --- Comment #2 from Lénárd Szolnoki --- (In reply to Lénárd Szolnoki from comment #0) > This was possibly impossible prior to C++20 to subscript an array of unknown > bound in constexpr context. As of P0388 conversion from T[N] to T[] can > happe

[Bug c++/97648] New: Rejects valid direct initialization from prvalue (private destructor)

2020-10-30 Thread leni536 at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- version: g++ (Compiler-Explorer-Build) 11.0.0 20201029 (experimental) options: -std=c++17 -O2 -pedantic-errors g++ rejects the

[Bug c++/86373] Destructor shall not be instantiated in C++17 mode for prvalue

2020-10-30 Thread leni536 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86373 Lénárd Szolnoki changed: What|Removed |Added CC||leni536 at gmail dot com --- Comment

[Bug c++/97647] New: Accepts undefined delete expression in constant expression

2020-10-30 Thread leni536 at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- version: g++ (Compiler-Explorer-Build) 11.0.0 20201029 (experimental) options: -std=c++20 -O2 -pedantic-errors g++ accepts the following program

[Bug c++/97645] New: Rejects valid subscript expression on array of unknown bound in constant expression

2020-10-30 Thread leni536 at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- version: g++ (Compiler-Explorer-Build) 11.0.0 20201029 (experimental) g++ rejects the following program in -std=c++20

[Bug c++/97643] New: Accepts invalid qualification conversion involving array of unknown bound [P0388]

2020-10-30 Thread leni536 at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- version: g++ (Compiler-Explorer-Build) 11.0.0 20201029 (experimental) https://godbolt.org/z/a8sKr3 In C++20 the following

[Bug c++/93711] ICE: [[no_unique_address] when constructing via template helper

2020-06-17 Thread leni536 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93711 Lénárd Szolnoki changed: What|Removed |Added CC||leni536 at gmail dot com --- Comment

[Bug c++/95701] New: undefined enum conversion accepted in constant expression

2020-06-16 Thread leni536 at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- gcc accepts the following code: enum E { one = 1 }; constexpr E foo() { return static_cast(0x); } void bar() { constexpr auto e

[Bug c++/95686] undefined reference to static local variable within inline function

2020-06-16 Thread leni536 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95686 --- Comment #2 from Lénárd Szolnoki --- I failed to mention that I compiled the example in -std=c++17. With this compiler option it compiles but fails to link in gcc. It compiles, links and runs as expected in clang. The linkage requirement for

[Bug c++/95686] New: undefined reference to static local variable within inline function

2020-06-15 Thread leni536 at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- The following code produces an "undefined reference to `foo()::i'" linker error: template struct S { static cons

[Bug c++/86577] non-ADL name lookup for operator<< at instantiation time?

2020-06-08 Thread leni536 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86577 --- Comment #3 from Lénárd Szolnoki --- (In reply to Jonathan Wakely from comment #2) > Is this a dup of PR 51577 ? Yes, seems like it is.

[Bug c++/86577] non-ADL name lookup for operator<< at instantiation time?

2020-06-08 Thread leni536 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86577 Lénárd Szolnoki changed: What|Removed |Added CC||leni536 at gmail dot com --- Comment

[Bug c++/90254] New: ice on aggregate initialization of unmovable base

2019-04-25 Thread leni536 at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- The compiler bumps into an internal compiler error on the following, valid code: //aggregate base class struct A1 { A1() = default; A1(const A1&) = de

[Bug c++/77875] C++ core issue 1288

2019-03-28 Thread leni536 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77875 --- Comment #3 from Lénárd Szolnoki --- A more worrisome example presumably for this same bug, it's a miscompilation: template decltype(auto) as_const(T& t) { using const_ref = const T&; return const_ref{t}; } int main() { int i =

[Bug c++/89857] New: list-initialization of unnamed, non-const reference type

2019-03-27 Thread leni536 at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- gcc doesn't compile the following well-formed program: void foo () { using T = int&; int i{}; T{i}; } $ g++ -std=c++17 -c

[Bug c++/89761] New: [9.0 Regression] ICE: tree check: expected class 'expression', have 'exceptional' (argument_pack_select)

2019-03-18 Thread leni536 at gmail dot com
Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- The following code triggers an ICE in g++ 9.0.1:

[Bug c++/89757] New: accepts returning with reference to temporary in constant expression

2019-03-18 Thread leni536 at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- g++ accepts this ill-formed code: constexpr const int& foo(int x, int y) { const int& z = x+y; return z; } const