https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
Jakub Jelinek changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
--- Comment #10 from CVS Commits ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
:
https://gcc.gnu.org/g:2513dad670c00dd9db3a85be348f6f4020b18b81
commit r10-8853-g2513dad670c00dd9db3a85be348f6f4020b18b81
Author: Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
--- Comment #9 from CVS Commits ---
The master branch has been updated by Jakub Jelinek :
https://gcc.gnu.org/g:56da736cc6ced0f1c339744321a14ae569db8606
commit r11-3582-g56da736cc6ced0f1c339744321a14ae569db8606
Author: Jakub Jelinek
Date: Th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
Marek Polacek changed:
What|Removed |Added
Keywords||patch
--- Comment #8 from Marek Polacek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
--- Comment #7 from Jakub Jelinek ---
So, what I see is that expand_default_init calls build_special_member_call for
the default ctor, but because the default ctor is an immediate method, it
returns a TARGET_EXPR with CONSTRUCTOR as the initializ
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
--- Comment #6 from Jakub Jelinek ---
Though, when the ctor is constexpr, it is constant initialized even without it,
so probably the bug is somewhere else.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
--- Comment #5 from Jakub Jelinek ---
More complete testcase:
struct A { consteval A () { i = 1; } consteval A (int x) : i (x) {} int i = 0;
};
struct B { constexpr B () { i = 1; } constexpr B (int x) : i (x) {} int i = 0;
};
A const a;
constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
--- Comment #4 from Marek Polacek ---
Yes, a way to fix this would be to do the build_functional_cast in
check_initializer:
6892 else if (DECL_DECLARED_CONSTEXPR_P (decl)
6893|| (flags & LOOKUP_CONSTINIT))
6894
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
--- Comment #3 from Jakub Jelinek ---
Though:
struct A { consteval A (int x) { i = x; } int i = 0; };
struct B { constexpr B (int x) { i = x; } int i = 0; };
A const a = 1;
constexpr A b = 2;
B const c = 3;
A constinit d = 4;
static_assert (b.i =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
CC|
11 matches
Mail list logo