[Bug c++/118951] __FILE__ inserts the filename as array, __builtin_FILE as pointer

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

[Bug c++/117293] SFINAE in class partial specialization "leaks" its side-effects

2025-02-14 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117293 --- Comment #8 from m.cencora at gmail dot com --- (In reply to Patrick Palka from comment #7) > Substituting U=string into overload_set::type during > overload resolution certainly has the side effect of instantiating that > class

[Bug c++/117293] SFINAE in class partial specialization "leaks" its side-effects

2024-10-25 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117293 --- Comment #4 from m.cencora at gmail dot com --- (In reply to Andrew Pinski from comment #2) > (In reply to Andrew Pinski from comment #1) > > I am not sure this is related to SFINAE though. > > > > Rather it is in a

[Bug c++/117293] SFINAE in class partial specialization "leaks" its side-effects

2024-10-25 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117293 --- Comment #6 from m.cencora at gmail dot com --- Another argument for not showing the deprecation is that if I change: string a; to const string a; I don't get any deprecation warnings, but only for gcc-11+. This means that int

[Bug c++/117293] SFINAE in class partial specialization "leaks" its side-effects

2024-10-25 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117293 --- Comment #3 from m.cencora at gmail dot com --- I think it should be marked rejects-valid because it makes valid program ill-formed if compiled with -Werror. The problematic diagnostic is user-defined but in code that is never reached, so

[Bug c++/117293] SFINAE in class partial specialization "leaks" its side-effects

2024-10-25 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117293 --- Comment #5 from m.cencora at gmail dot com --- > I'd say that warning is not expected, because user's code didn't (directly > or indirectly) call the deprecated constructor. Or to state it differently: user calls

[Bug c++/117293] New: SFINAE in class partial specialization "leaks" its side-effects

2024-10-25 Thread m.cencora at gmail dot com via Gcc-bugs
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- It seems like the deprecation warning is kept even if triggered due to failed substitution in context of class partial speciali

[Bug c++/115798] [15 Regression][modules] ICE when re-exporting a type exported from base module's GMF

2024-07-05 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115798 --- Comment #2 from m.cencora at gmail dot com --- (In reply to m.cencora from comment #1) > Also this is specific to types exported from GMF, if type is declared > directly in named module it works fine, i.e. > > $ cat base.c

[Bug c++/115798] [15 Regression][modules] ICE when re-exporting a type exported from base module's GMF

2024-07-05 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115798 --- Comment #1 from m.cencora at gmail dot com --- Also this is specific to types exported from GMF, if type is declared directly in named module it works fine, i.e. $ cat base.cpp export module base; export { using int8_t = signed char

[Bug c++/115798] New: [15 Regression][modules] ICE when re-exporting a type exported from base module's GMF

2024-07-05 Thread m.cencora at gmail dot com via Gcc-bugs
IRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat base.cpp module; #include export module base; export { using ::int8_t; } export namespac

[Bug c++/114600] [14 Regression] [modules] redefinition errors when using certain std headers in GMF

2024-06-13 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114600 --- Comment #15 from m.cencora at gmail dot com --- Thanks! Unfortunately it seems that your changes broke reexporting of types declared in other module. It works fine on gcc-14. $ cat base.cpp module; #include export module base; export

[Bug libstdc++/106852] Implement C++23 P2465R3 Standard Library Modules std and std.compat

2024-06-12 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106852 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/115445] [15 Regression] [modules] ICE when repeating an export of function declared in GMF

2024-06-11 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115445 --- Comment #1 from m.cencora at gmail dot com --- Works fine on gcc-14 and clang

[Bug c++/115446] New: [15 Regression] Segfault when exporting operator new

2024-06-11 Thread m.cencora at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat op_new.cpp module; void* operator new(unsigned long, void*); namespace std { template auto construct_at(_Tp*) -> decltype(::new((void*)0) _Tp()) { ret

[Bug c++/115445] New: [15 Regression] ICE when repeating an export of function declared in GMF

2024-06-11 Thread m.cencora at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat repeated_using.cpp module; namespace std { void make_error_code(); } export module std; export namespace std

[Bug c++/114867] [modules] name lookup issues when a function overload set is exported from GMF

2024-05-06 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114867 --- Comment #1 from m.cencora at gmail dot com --- The unreduced code is actually a regression from gcc-12. @Jonathan Wakely: Could you maybe workaround it in libstdc++ by declaring the std::swap overload for exception_ptr in additional inline

[Bug c++/114685] [modules] ICE when exporting a type through a different alias then one declared in GMF

2024-04-26 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114685 --- Comment #4 from m.cencora at gmail dot com --- I've stumbled upon a related error when trying to export std::vector after inclusion of in GMF: module; namespace std { class vector; namespace __format { using std::vector; } } e

[Bug c++/114868] New: [modules] func declared in GMF and exported via using-decl in module partition is not actually exported

2024-04-26 Thread m.cencora at gmail dot com via Gcc-bugs
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat mod.cpp export module mod; export import :part; export void foo

[Bug c++/114867] New: [modules] name lookup issues when a function overload set is exported from GMF

2024-04-26 Thread m.cencora at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat future.cpp module; namespace std { template void swap(_Tp& a, _Tp& b); namespace __exception_ptr

[Bug c++/114685] [modules] ICE when exporting a type through a different alias then one declared in GMF

2024-04-10 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114685 --- Comment #1 from m.cencora at gmail dot com --- Oops, the -isystem and -std options are not necessary for reproduction. This is enough: $ g++ -fmodules-ts lldiv_t.cpp

[Bug c++/114600] [14 Regression] [modules] redefinition errors when using certain std headers in GMF

2024-04-10 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114600 m.cencora at gmail dot com changed: What|Removed |Added Attachment #57921|0 |1 is obsolete

[Bug c++/114600] [14 Regression] [modules] redefinition errors when using certain std headers in GMF

2024-04-10 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114600 --- Comment #9 from m.cencora at gmail dot com --- (In reply to Jonathan Wakely from comment #8) > Thanks. I hope we'll end up auto-generating a file like that from > ../gcc/cp/cxxapi-data.csv Hmm, then that file will have to

[Bug c++/114685] New: [modules] ICE when exporting a type through a different alias then one declared in GMF

2024-04-10 Thread m.cencora at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat lldiv_t.cpp module; #include "lldiv_t.h" export module std; export namespace std { using :

[Bug c++/114683] New: [modules] name declared in GMF in inline namespace and exported via using-decl from parent namespace is not visible to importer

2024-04-10 Thread m.cencora at gmail dot com via Gcc-bugs
Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat std.cpp module; #include "std.h&quo

[Bug c++/114600] [14 Regression] [modules] redefinition errors when using certain std headers in GMF

2024-04-10 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114600 --- Comment #7 from m.cencora at gmail dot com --- Created attachment 57921 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57921&action=edit Full "std" module FYI if you want to stress test the modules impl w.r.t. simila

[Bug c++/114600] [modules] redefinition errors when using certain std headers in GMF

2024-04-05 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114600 --- Comment #1 from m.cencora at gmail dot com --- gcc version info: g++-14 (Ubuntu 14-20240330-1ubuntu2) 14.0.1 20240330 (experimental) [master r14-9728-g6fc84f680d0] Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see

[Bug c++/114600] New: [modules] redefinition errors when using certain std headers in GMF

2024-04-05 Thread m.cencora at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat std.cpp module; #include export module std; $ cat main.cpp import std; #include int main() { } $ g++ -std=c++20

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2024-01-04 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #11 from m.cencora at gmail dot com --- This is surprising to say the least because apparently for following code (where both conversion operators return same type) the compiler somehow correctly chooses && qualified

[Bug c++/113219] Overloaded ref-qualified conversion operator triggers bogus -Wconversion

2024-01-04 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113219 --- Comment #2 from m.cencora at gmail dot com --- So I guess this falls into the "confusing overload resolution for user-defined conversion" but I fail to see what can be confusing here. createInt() returns prvalue, so later it binds

[Bug c++/113219] New: Overloaded ref-qualified conversion operator triggers bogus -Wconversion

2024-01-03 Thread m.cencora at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code when compiled on any gcc version (checked all available on godbolt since gcc-7) triggers conversion warnings. I

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-19 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #5 from m.cencora at gmail dot com --- (In reply to m.cencora from comment #4) > This also might be a just another symptom of the same root cause: This one is actually a regression (worked on gcc 8.3 and older)

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-19 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #4 from m.cencora at gmail dot com --- This also might be a just another symptom of the same root cause: struct bar { bar() = default; bar(const bar&); bar(bar&&); bar& operator=(const bar&);

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-18 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #2 from m.cencora at gmail dot com --- > When invoking the conversion operator the problem does not occur. When invoking the conversion operator *explicitly* the problem does not occur.

[Bug c++/113064] assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-18 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113064 --- Comment #1 from m.cencora at gmail dot com --- Fixed sample (a typo in else branch of WORKAROUND2): struct no_copy { no_copy() = default; no_copy(const no_copy&) = delete; no_copy(no_copy&&); no_copy&

[Bug c++/113064] New: assignement from temporary sometimes invokes copy-assign instead of move-assign operator

2023-12-18 Thread m.cencora at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code fails to compile on any gcc version with any selected language version. Works with clang. When

[Bug c++/93259] Unsized temporary array initialization problem

2023-12-12 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93259 --- Comment #7 from m.cencora at gmail dot com --- This seems to be fixed in gcc 12.3 and gcc 13+ Can we close this?

[Bug libstdc++/111511] Incorrect ADL in std::to_array in GCC 11/12/13

2023-09-21 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111511 --- Comment #4 from m.cencora at gmail dot com --- Ack

[Bug libstdc++/111511] Incorrect ADL in std::to_array in GCC 11/12/13

2023-09-21 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111511 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug target/110303] With -O0, _mm_shuffle_epi32 with a constexpr function argument does not compile

2023-06-19 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110303 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug ipa/109770] [10/11/12/13/14 Regression] wrong(?) devirtualization

2023-05-09 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109770 --- Comment #8 from m.cencora at gmail dot com --- (In reply to Richard Biener from comment #7) > > Ah, interesting. I was looking for an answer whether > > new T > > may produce anything other than an object with dynamic

[Bug ipa/109770] [10/11/12/13/14 Regression] wrong(?) devirtualization

2023-05-09 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109770 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/99637] bit_cast doesn't work with padding bits and it should

2023-04-26 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99637 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993 --- Comment #14 from m.cencora at gmail dot com --- Yeah, in CWG issue comments it is much more clear - but I cannot find such a wording in C++ latest draft. English is not my native language so this one is on me.

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993 --- Comment #11 from m.cencora at gmail dot com --- Nvm, I understood this rule differently. You are saying that initialization is two step: - first zero-initialized, - then default-initialized. For me the way this rule is written is

[Bug c++/108993] Value initialization does not occur for derived class , for gcc versions > 5

2023-04-21 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108993 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug libstdc++/109482] experimental/net/internet/endpoint/cons.cc FAILs

2023-04-12 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109482 --- Comment #8 from m.cencora at gmail dot com --- Ah, I see that gcc doesn't support nested designated initializer in C++ mode (compared to C mode, or clang in both C and C++ modes).

[Bug libstdc++/109482] experimental/net/internet/endpoint/cons.cc FAILs

2023-04-12 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109482 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/108788] New: Lookup of injected class name should be type-dependent

2023-02-14 Thread m.cencora at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code fails to compile on any gcc version. Works on all clang versions. It looks like inside template function get_templ_base the lookup of v.templ_base::a

[Bug c++/108594] GCC ignores deleted movement constructor is not used on return

2023-01-30 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108594 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/108506] bit_cast from 32-byte vector generates worse code than memcpy

2023-01-23 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108506 --- Comment #1 from m.cencora at gmail dot com --- "that is the only difference between the two funcs" I mean that deserialize and deserialize2 differ only by the way they perform store from v32uc to output (bit_cast vs memcpy)

[Bug c++/108506] New: bit_cast from 32-byte vector generates worse code than memcpy

2023-01-23 Thread m.cencora at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Gcc trunk on x86-64 produces much worse assembly for 'deserialize' func than for equivalent 'deserialize2'. These two

[Bug c++/108417] [ICE] Crash on aggregate initialization of base class

2023-01-17 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108417 --- Comment #7 from m.cencora at gmail dot com --- Hmm, ok. So if I wanted to workaround this in generic code, what kind of types should I exclude from aggregate initialization? Any type that has a base class with a tail padding? Or just the

[Bug c++/108417] [ICE] Crash on aggregate initialization of base class

2023-01-16 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108417 --- Comment #4 from m.cencora at gmail dot com --- (In reply to Andrew Pinski from comment #3) > I am 99% sure this is the same issue as pr98995 even though this is a crash. > The ice is the same as PR 93711. > > This code has

[Bug c++/108417] [ICE] Crash on aggregate initialization of base class

2023-01-16 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108417 --- Comment #1 from m.cencora at gmail dot com --- The problem seems to occur if base class has a tail padding, and derived class is trying to reuse it to store its members

[Bug c++/108417] New: [ICE] Crash on aggregate initialization of base class

2023-01-16 Thread m.cencora at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Code below compiled on any gcc<11 crashes with following output: during RTL pass: expand : In function 'Derived ICE_createDerived()': :37:5: internal c

[Bug middle-end/35560] Missing CSE/PRE for memory operations involved in virtual call.

2023-01-09 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35560 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/108181] New: [missed optimization] Call to virtual function under runtime index should be optimized into jump with an offset

2022-12-19 Thread m.cencora 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: m.cencora at gmail dot com Target Milestone: --- Given code below compiled with g++ 11 or newer, compiler should be

[Bug libgcc/107675] [13 Regression] GCC-13 is significantly slower to startup on C++ statically linked programs

2022-12-09 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107675 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/106889] New: __builtin_strlen fails for some constexpr constructs

2022-09-08 Thread m.cencora at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Compiling following program on any gcc version, with C++14 or newer standard fails with "'__builtin_strlen(...)' is not a constant expression" fo

[Bug c++/106567] [13 Regression] An array with a dependent type and initializer-deduced bound is treated as an array of unknown bound when captured in a lambda

2022-08-09 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106567 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/100157] Support `__type_pack_element` like Clang

2022-06-30 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100157 --- Comment #5 from m.cencora at gmail dot com --- Yeah, __is_same builtin beats custom unique-id comparisons, but it is available only since gcc-10 so unavailable for me. Recently I discovered this one (only works for unique types), and it is

[Bug c++/100157] Support `__type_pack_element` like Clang

2022-06-30 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100157 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/90254] [9 Regression] ice on aggregate initialization of unmovable base

2022-06-09 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90254 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/105737] [10/11 only] Incorrect evaluation order in new expression

2022-05-26 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105737 --- Comment #3 from m.cencora at gmail dot com --- FWIW Ordered evaluation of elements in braced-init-list exists since C++11 (it was not a part of P0145).

[Bug c++/105737] New: Incorrect evaluation order in new expression

2022-05-26 Thread m.cencora at gmail dot com via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following program when compiled with -std=c++17 prints 1243, while it should print 1234. All gcc < 12 versions are affected. #include struct MyStruct { }; struct MyTu

[Bug sanitizer/105592] array out of bound not detected by ubsan

2022-05-13 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105592 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/105260] Union with user-defined empty destructor leads to worse code-gen

2022-04-13 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105260 --- Comment #6 from m.cencora at gmail dot com --- Furthermore in all the scenarios the same function is called, with same arguments, so the calling convention/ABI is same.

[Bug c++/105260] Union with user-defined empty destructor leads to worse code-gen

2022-04-13 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105260 --- Comment #5 from m.cencora at gmail dot com --- I've slighlty refactored the code, to remove the auto variables. This issue remains #include inline unsigned deserializeUInt(const unsigned char* &in) { unsigned out; __built

[Bug c++/105260] Union with user-defined empty destructor leads to worse code-gen

2022-04-13 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105260 --- Comment #4 from m.cencora at gmail dot com --- I dont think ABI is an issue here. The Foo variable is spilled into stack, and then reloaded back into RDI register before invoking dummyFunc. Also clang generates optimal code as can be seen

[Bug c++/105260] New: Union with user-defined empty destructor leads to worse code-gen

2022-04-13 Thread m.cencora at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code leads to unnecessary stack spill of deserialized Foo variable: g++ -std=c++17 -O2 #include inline unsigned

[Bug c++/104597] LTO does not inline indirect call

2022-02-18 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104597 --- Comment #2 from m.cencora at gmail dot com --- Similarly when indirect call is a result of virtual function call, gcc cannot optimize it, while clang can: // main.cpp struct foo { virtual int getInt0() const = 0; virtual int getInt1

[Bug c++/104597] LTO does not inline indirect call

2022-02-18 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104597 --- Comment #1 from m.cencora at gmail dot com --- clang-12 optimizes it to: Dump of assembler code for function main: 0x00401110 <+0>: mov$0x1,%eax 0x00401115 <+5>: ret

[Bug c++/104597] New: LTO does not inline indirect call

2022-02-18 Thread m.cencora at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Given following files: // main.cpp using intfunc = int (*)(); intfunc getIntFunc(int i); namespace { int test() { auto func = getIntFunc(1); return func(); } } int main

[Bug c++/104302] [12 Regression] ICE Segmentation fault since r12-6825-g2da90ad39bf8fa9e

2022-02-03 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104302 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/93740] Template base classes parametrized by pointer-to-member are amibiguous

2022-01-25 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93740 --- Comment #5 from m.cencora at gmail dot com --- I think I was able to narrow it down to the true root cause. Following fails in all gcc versions that supports C++11 and newer: struct foo { void baz(); void bar(); }; static_assert

[Bug c++/103563] ostream operator<< resolved to variant containing type resulting in stack overflow

2021-12-06 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103563 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/93259] Unsized temporary array initialization problem

2021-11-25 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93259 --- Comment #4 from m.cencora at gmail dot com --- This might be related to CWG2487 "Type dependence of function-style cast to incomplete array type"

[Bug libstdc++/93059] char and char8_t does not talk with each other with memcpy. std::copy std::copy_n, std::fill, std::fill_n, std::uninitialized_copy std::uninitialized_copy_n, std::fill, std::unin

2021-10-06 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93059 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug libstdc++/99327] ENOTSUP macro does not exist on djgpp crt

2021-10-02 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99327 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug libstdc++/100334] atomic::notify_one() sometimes wakes wrong thread

2021-04-29 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100334 --- Comment #5 from m.cencora at gmail dot com --- Actually standard seems to require it - at least to my understanding of wait() description in in chapter 31.8.1: it explicitly states that waiting is performed in a loop, and loop is exited

[Bug libstdc++/100334] atomic::notify_one() sometimes wakes wrong thread

2021-04-29 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100334 --- Comment #3 from m.cencora at gmail dot com --- If my analysis is correct then: - we need to force __all = true param in __waiter_pool_base::_M_notify, - protect from spurious wakeups in __waiter_pool::_M_do_wait by rechecking if the value

[Bug libstdc++/100334] atomic::notify_one() sometimes wakes wrong thread

2021-04-29 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100334 --- Comment #2 from m.cencora at gmail dot com --- I have adapted the test to gcc trunk, but I am not entirely sure it is correct, because I don't have gcc trunk locally, I was just testing this on wandbox.org The problem is even bigger

[Bug libstdc++/100334] atomic::notify_one() sometimes wakes wrong thread

2021-04-29 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100334 --- Comment #1 from m.cencora at gmail dot com --- This test assumes previous waiter implementation (I used gcc-11 available from Ubuntu 21.04), latest atomic_wait impl has the same problem, it is just that waiter is selected in a different way

[Bug libstdc++/100334] New: atomic::notify_one() sometimes wakes wrong thread

2021-04-29 Thread m.cencora at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- If waiter pool implementation is used in std::atomic::wait/notify for given T, then notify_one must underneath call notify_all to make sure that proper thread is

[Bug c++/99185] asan initialization-order-fiasco false positive

2021-02-22 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99185 --- Comment #8 from m.cencora at gmail dot com --- It does not matter whether A constructor is default or empty. If class instance cannot be constant-initialized then dynamic initialization will take place. I think gcc just incorrectly performs

[Bug c++/99185] asan initialization-order-fiasco false positive

2021-02-22 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99185 --- Comment #6 from m.cencora at gmail dot com --- Now that I think about and having read relevant chapters of C++20 spec, observed behavior seems to be expected. A cannot be constant initialized (because it has missing initializer for '

[Bug c++/99185] asan initialization-order-fiasco false positive

2021-02-22 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99185 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/99186] std::tuple compilation error when elements are specializations of template class declared with template < auto E > syntax with E being a enumerator of a enum

2021-02-22 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99186 m.cencora at gmail dot com changed: What|Removed |Added CC||m.cencora at gmail dot com

[Bug c++/98637] New: Changing active union member via assignment expression should require trivial default constructor in constexpr context

2021-01-12 Thread m.cencora at gmail dot com via Gcc-bugs
Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- According to http://eel.is/c++draft/class.union#general-6

[Bug c++/98620] New: SFINAE code in class specialization generate warnings

2021-01-11 Thread m.cencora at gmail dot com via Gcc-bugs
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code compiled in any gcc>=5, C++11 or higher, and -Wmissing-field-initializers generate compiler warning: g++ -std=c++20 -Wmissing-field-initializ

[Bug c++/98122] New: [regression] Accessing union member through pointer-to-member is not a constant expression

2020-12-03 Thread m.cencora at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code does not compile on gcc-10 and newer in all std C++14-20 modes. This used to work in gcc-9 and

[Bug c++/93740] Template base classes parametrized by pointer-to-member are amibiguous

2020-12-03 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93740 --- Comment #4 from m.cencora at gmail dot com --- I have done some more experiments, and it seems the problem applies to all pointer-to-member (not just pointer to member function, but also for pointer to data member). Also it doesn't matt

[Bug c++/93259] Unsized temporary array initialization problem

2020-12-03 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93259 --- Comment #3 from m.cencora at gmail dot com --- Still fails on gcc 10.2 and trunk, in all std C++11-20 modes

[Bug c++/93740] Template base classes parametrized by pointer-to-member are amibiguous

2020-12-03 Thread m.cencora at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93740 --- Comment #3 from m.cencora at gmail dot com --- Still broken in gcc 10.2 and trunk, also in C++20 mode. The problem seems to show up only when address of member function (virtual or not) is passed as template parameter - only then gcc fails

[Bug c++/94062] Cannot construct tuple from convertible types

2020-08-17 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94062 --- Comment #17 from m.cencora at gmail dot com --- Ah, I see. I was under the impression, that tuple elements were always stored as base classes, but now I see that it is only the case if element type is empty non-final class.

[Bug c++/94062] Cannot construct tuple from convertible types

2020-08-17 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94062 --- Comment #14 from m.cencora at gmail dot com --- (In reply to Jonathan Wakely from comment #13) > (In reply to m.cencora from comment #12) > > So unless I am missing something, I see no escape hatch for making such > > constru

[Bug c++/94062] Cannot construct tuple from convertible types

2020-08-17 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94062 --- Comment #12 from m.cencora at gmail dot com --- (In reply to Jonathan Wakely from comment #11) > > Standard says that if: > > std::is_constructible_v > > then > > std::is_constructible_v, Foo&&> > >

[Bug c++/94062] Cannot construct tuple from convertible types

2020-03-19 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94062 --- Comment #9 from m.cencora at gmail dot com --- (In reply to Jonathan Wakely from comment #8) > No, we can switch to using a data member with the [[no_unique_address]] > attribute, which is on my TODO list for gcc-11. See PR 55713

[Bug c++/94062] Cannot construct tuple from convertible types

2020-03-19 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94062 --- Comment #7 from m.cencora at gmail dot com --- (In reply to Jonathan Wakely from comment #6) > Further reduced: > > struct Bar1 > { > Bar1(Bar1&&) = delete; > }; > > struct Foo1 > { > operator Bar1(

[Bug libstdc++/94062] Cannot construct tuple from convertible types

2020-03-19 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94062 --- Comment #4 from m.cencora at gmail dot com --- Ping(In reply to Jonathan Wakely from comment #2) > I guess you're compiling in C++17 mode, but I shouldn't have to guess the > options you're passing to the compiler. Pl

  1   2   >