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

2020-03-05 Thread m.cencora at gmail dot com
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code does not compile on any gcc version that supports C++17 standard. It compiles fine on clang. While the static asserts pass, we get compilation error on

[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 #1 from m.cencora at gmail dot com --- Ping

[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

[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 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-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-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 #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++/93101] New: [regression] ICE - aggregate initialization of base

2019-12-30 Thread m.cencora at gmail dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code snippet compiles fine with gcc 9 and earlier, but ICEs on gcc 10.0.0 20191229 (verified on godbolt.org) #include struct base { std::string bla

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

2020-01-14 Thread m.cencora at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- using Array = int[]; auto && array = Array { 1, 2, 3 }; decltype(array) differs depending on if it is declared inside function, or function template. I.e. following

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

2020-02-14 Thread m.cencora at gmail dot com
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 any gcc version regardless of chosen C++ standard version, but compiles correctly on clang, msvc

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

2020-03-03 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93740 --- Comment #1 from m.cencora at gmail dot com --- Ping

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

2020-03-03 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93259 --- Comment #2 from m.cencora at gmail dot com --- Ping

[Bug c++/91606] New: [9 regression] Optimization leads to invalid code

2019-08-30 Thread m.cencora at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following code is miscompiled in C++14 mode and -O2 optimization level. This works fine when compiled: - in C++17 mode, or lower optimization level - on previous gcc

[Bug c++/90858] Pointer to member is treated as non-constexpr

2019-09-30 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90858 --- Comment #2 from m.cencora at gmail dot com --- This bug exists since the beginning of C++11 constexpr support (gcc 4.7). Here is a reproducer for C++11: struct Base { int a; template static constexpr int for_all_data_members(F

[Bug c++/91606] [9/10 regression] Optimization leads to invalid code

2019-10-01 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91606 --- Comment #6 from m.cencora at gmail dot com --- Just a wild guess, but maybe it is related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90858 and there it just manifests itself in compilation error because it is in constexpr context.

[Bug c++/91606] [9 regression] Optimization leads to invalid code

2019-10-02 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91606 --- Comment #13 from m.cencora at gmail dot com --- You can remove my_array from the test case. I put there only to show that using it instead of std::array allows to workaround the bug.

[Bug c++/90858] Pointer to member is treated as non-constexpr

2019-10-08 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90858 --- Comment #3 from m.cencora at gmail dot com --- Ping? As reporter can I do anything more to move this bug forward?

[Bug c++/90858] Pointer to member is treated as non-constexpr

2019-10-08 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90858 --- Comment #5 from m.cencora at gmail dot com --- Nice! Do you plan on backporting the fix to active branches? (all gcc versions since 4.7 are affected)

[Bug c++/90858] New: Pointer to member is treated as non-constexpr

2019-06-12 Thread m.cencora at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Hi, this is a minimal reproducer I could come up with. Compiles fine with clang. It compiles fine if Foo1 is not nested inside Foo2. #include #include template struct

[Bug c++/90858] Pointer to member is treated as non-constexpr

2019-06-17 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90858 --- Comment #1 from m.cencora at gmail dot com --- Here is another repoducer, that does not use std::variant: #include #include #include struct Base { int a; template static constexpr auto for_all_data_members(F&&a

[Bug c++/90936] New: [9 Regression] Ambiguous call with ref-qualified conversion operators

2019-06-19 Thread m.cencora at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- gcc 9 and trunk complains about ambiguous call when constructing or assigning to f2. This works fine with gcc 8 or earlier. struct

[Bug c++/90936] [9 Regression] Ambiguous call with ref-qualified conversion operators

2019-06-19 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90936 --- Comment #2 from m.cencora at gmail dot com --- Hmm, if it is expected, shouldn't gcc also report ambiguous call for f1 construction and assignment as well?

[Bug libstdc++/86751] New: Ambiguous operator= overload for std::pair

2018-07-31 Thread m.cencora at gmail dot com
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following program does not compile since gcc 6.3 (this looks similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79141) #include struct dummy { template

[Bug libstdc++/86751] [6/7/8 Regression] Ambiguous operator= overload for std::pair

2018-08-01 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86751 --- Comment #4 from m.cencora at gmail dot com --- That was fast, thanks a lot! Confirming with compiler explorer - this is fixed on trunk.

[Bug libstdc++/86751] [6/7/8 Regression] Ambiguous operator= overload for std::pair

2018-08-01 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86751 --- Comment #5 from m.cencora at gmail dot com --- That was fast, thanks a lot! Confirmed with compiler explorer - this is fixed on trunk.

[Bug c++/87934] New: [8 regression] struct with NSDMI of enum makes initialization a non-constant expression

2018-11-08 Thread m.cencora at gmail dot com
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 in g++8 and trunk, while it compiles with g++7 and older. struct Foo { enum

[Bug c++/88312] New: [9 regression] Mishandled explicitly provided parameter pack

2018-12-03 Thread m.cencora at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Following program fails to compile with latest gcc, while it compiles with gcc 8 and earlier, and with clang as well. #include #include

[Bug c++/70723] New: Missed optimization opportunity for lambda converted to fun-ptr

2016-04-19 Thread m.cencora at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- Hi, the following code gets properly optimized-out if erasedTypeVTable is initialized with &dtor (case [2]), but it is not optim

[Bug c++/70723] Missed optimization opportunity for lambda converted to fun-ptr

2016-04-19 Thread m.cencora at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70723 --- Comment #2 from m.cencora at gmail dot com --- If that's the case then it should get automatically resolved once C++17 is implemented - C++17 introduces constexpr lambdas. But it would be great to have this optimization also in C++14 mode.

[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++/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 #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++/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++/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++/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++/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++/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++/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 --- 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 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 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] 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 #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 #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 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++/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 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] [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-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++/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++/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++/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++/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++/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++/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] 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++/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++/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] 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 #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++/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++/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++/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++/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++/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 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 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++/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 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++/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 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++/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 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++/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++/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++/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 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 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++/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 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 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 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 --- 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++/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 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 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 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++/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] [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++/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++/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++/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++/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++/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++/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++/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++/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++/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 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

  1   2   >