[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2023-07-07 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #12 from Sergey Fedorov  ---
I am getting similar errors with 12.3.0:

:info:build   /opt/local/bin/g++-mp-12 -o
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_nodejs20/nodejs20/work/node-v20.4.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/inspector/string-util.o
../deps/v8/src/inspector/string-util.cc '-DNODE_OPENSSL_CONF_NAME=nodejs_conf'
'-DICU_NO_USER_DATA_OVERRIDE' '-DV8_GYP_BUILD'
'-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-DV8_TARGET_ARCH_PPC'
'-DV8_TARGET_ARCH_PPC_BE' '-DV8_HAVE_TARGET_OS' '-DV8_TARGET_OS_MACOS'
'-DV8_EMBEDDER_STRING="-node.10"' '-DENABLE_DISASSEMBLER'
'-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT'
'-DV8_ATOMIC_OBJECT_FIELD_WRITES' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS'
'-DV8_USE_SIPHASH' '-DV8_SHARED_RO_HEAP' '-DV8_WIN64_UNWINDING_INFO'
'-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_USE_ZLIB'
'-DV8_ENABLE_TURBOFAN' '-DV8_ENABLE_WEBASSEMBLY'
'-DV8_ENABLE_JAVASCRIPT_PROMISE_HOOKS' '-DV8_ALLOCATION_FOLDING'
'-DV8_ALLOCATION_SITE_TRACKING' '-DV8_SCRIPTORMODULE_LEGACY_LIFETIME'
'-DV8_ADVANCED_BIGINT_ALGORITHMS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_nodejs20/nodejs20/work/zlib-inc
-I/opt/local/libexec/openssl3/include/openssl -I../deps/v8 -I../deps/v8/include
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_nodejs20/nodejs20/work/node-v20.4.0/out/Release/obj/gen/inspector-generated-output-root
-I../deps/v8/third_party/inspector_protocol
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_nodejs20/nodejs20/work/node-v20.4.0/out/Release/obj/gen
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_nodejs20/nodejs20/work/node-v20.4.0/out/Release/obj/gen/generate-bytecode-output-root
-I../deps/v8/third_party/zlib -I../deps/v8/third_party/zlib/google  -O3
-gdwarf-2 -fstrict-aliasing -mmacosx-version-min=10.6 -Wall -Wendif-labels -W
-Wno-unused-parameter -fno-rtti -fno-exceptions -fno-strict-aliasing
-fpermissive -isystem/opt/local/include/LegacySupport -MMD -MF
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_nodejs20/nodejs20/work/node-v20.4.0/out/Release/.deps//opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_nodejs20/nodejs20/work/node-v20.4.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/inspector/string-util.o.d.raw
  -c
:info:build ../deps/v8/src/inspector/injected-script.cc: In constructor
'v8_inspector::InjectedScript::InjectedScript(v8_inspector::InspectedContext*,
int)':
:info:build ../deps/v8/src/inspector/injected-script.cc:389:48: error: use of
deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred,
_Alloc>::unordered_map() [with _Key = v8_inspector::String16; _Tp =
std::vector; _Hash = std::hash; _Pred =
std::equal_to; _Alloc = std::allocator > >]'
:info:build   389 | : m_context(context), m_sessionId(sessionId) {}
:info:build   |^
:info:build In file included from
/opt/local/include/gcc12/c++/unordered_map:47,
:info:build  from
../deps/v8/src/inspector/injected-script.h:35:
:info:build /opt/local/include/gcc12/c++/bits/unordered_map.h:141:7: note:
'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with
_Key = v8_inspector::String16; _Tp = std::vector; _Hash =
std::hash; _Pred =
std::equal_to; _Alloc = std::allocator > >]' is implicitly deleted because
the default definition would be ill-formed:
:info:build   141 |   unordered_map() = default;
:info:build   |   ^
:info:build /opt/local/include/gcc12/c++/bits/unordered_map.h:141:7: error: use
of deleted function 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
_Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable() [with _Key =
v8_inspector::String16; _Value = std::pair >; _Alloc = std::allocator > >; _ExtractKey =
std::__detail::_Select1st; _Equal = std::equal_to;
_Hash = std::hash; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits]'
:info:build In file included from
/opt/local/include/gcc12/c++/unordered_map:46:
:info:build /opt/local/include/gcc12/c++/bits/hashtable.h:531:7: note:
'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash,
_Unused, _RehashPolicy, _Traits>::_Hashtable() [with _Key =
v8_inspector::String16; _Value = std::pair >; _Alloc = std::allocator > >; _ExtractKey =
std::__detail::_Select1st; _Equal = std::equal_to;
_Hash = std::hash; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-11-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

--- Comment #11 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
:

https://gcc.gnu.org/g:5c86e63cb0383a38ec3dea24e9b3fe2f6e312057

commit r10-10305-g5c86e63cb0383a38ec3dea24e9b3fe2f6e312057
Author: Jonathan Wakely 
Date:   Tue Jul 20 15:20:41 2021 +0100

libstdc++: fix is_default_constructible for hash containers [PR 100863]

The recent change to _Hashtable_ebo_helper for this PR broke the
is_default_constructible trait for a hash container with a non-default
constructible allocator. That happens because the constructor needs to
be user-provided in order to initialize the member, and so is not
defined as deleted when the type is not default constructible.

By making _Hashtable derive from _Enable_special_members we can ensure
that the default constructor for the std::unordered_xxx containers is
deleted when it would be ill-formed. This makes the trait give the
correct answer.

This backport to gcc-10 includes the fix for PR 101583.

Signed-off-by: Jonathan Wakely 

libstdc++-v3/ChangeLog:

PR libstdc++/100863
* include/bits/hashtable.h (_Hashtable): Conditionally delete
default constructor by deriving from _Enable_default_constructor.
Construct that base-class explicitly in all non-forwarding,
non-defaulted constructors.
* testsuite/23_containers/unordered_map/cons/default.cc: New test.
* testsuite/23_containers/unordered_set/cons/default.cc: New test.

(cherry picked from commit 89ec3b67dbe856a447d068b053bc19559f136f43)

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-10-14 Thread thiago at kde dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

Thiago Macieira  changed:

   What|Removed |Added

 CC||thiago at kde dot org

--- Comment #10 from Thiago Macieira  ---
(In reply to Jonathan Wakely from comment #9)
> Thanks for noticing I missed it.

Well, I had to clear C++'s good name when Arjan complained that he couldn't
understand what the compiler was telling him about  :)

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-10-14 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

--- Comment #9 from Jonathan Wakely  ---
Thanks for noticing I missed it.

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-10-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

--- Comment #8 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
:

https://gcc.gnu.org/g:3bf56cdf5ec5e07ea34e6be0110ab8fc76641d87

commit r11-9153-g3bf56cdf5ec5e07ea34e6be0110ab8fc76641d87
Author: Jonathan Wakely 
Date:   Thu Jul 22 18:49:57 2021 +0100

libstdc++: Fix non-default constructors for hash containers [PR101583]

When I added the new mixin to _Hashtable, I forgot to explicitly
construct it in each non-default constructor. That means you can't
use any constructors unless all three of the hash function, equality
function, and allocator are all default constructible.

libstdc++-v3/ChangeLog:

PR libstdc++/101583
* include/bits/hashtable.h (_Hashtable): Replace mixin with
_Enable_default_ctor. Construct it explicitly in all
non-forwarding, non-defaulted constructors.
* testsuite/23_containers/unordered_map/cons/default.cc: Check
non-default constructors can be used.
* testsuite/23_containers/unordered_set/cons/default.cc:
Likewise.

(cherry picked from commit 8ed6cfbbee74ec9e03f2558b9c36f61dd7d4dcfd)

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-10-14 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

--- Comment #7 from Jonathan Wakely  ---
Oops, yes, I thought I'd included this in my backports. Doing it now ...

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-10-13 Thread arjan at linux dot intel.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

Arjan van de Ven  changed:

   What|Removed |Added

 CC||arjan at linux dot intel.com

--- Comment #6 from Arjan van de Ven  ---
the original bug was backported to the stable 11 branch...
.. should the fix be as well ?

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-07-22 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

Jonathan Wakely  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #5 from Jonathan Wakely  ---
Fixed!

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-07-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:8ed6cfbbee74ec9e03f2558b9c36f61dd7d4dcfd

commit r12-2476-g8ed6cfbbee74ec9e03f2558b9c36f61dd7d4dcfd
Author: Jonathan Wakely 
Date:   Thu Jul 22 18:49:57 2021 +0100

libstdc++: Fix non-default constructors for hash containers [PR101583]

When I added the new mixin to _Hashtable, I forgot to explicitly
construct it in each non-default constructor. That means you can't
use any constructors unless all three of the hash function, equality
function, and allocator are all default constructible.

libstdc++-v3/ChangeLog:

PR libstdc++/101583
* include/bits/hashtable.h (_Hashtable): Replace mixin with
_Enable_default_ctor. Construct it explicitly in all
non-forwarding, non-defaulted constructors.
* testsuite/23_containers/unordered_map/cons/default.cc: Check
non-default constructors can be used.
* testsuite/23_containers/unordered_set/cons/default.cc:
Likewise.

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-07-22 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

Jonathan Wakely  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Target Milestone|--- |12.0
   Last reconfirmed||2021-07-22
 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org

--- Comment #3 from Jonathan Wakely  ---
Oops, I need to call the non-default constructor of the _Enable_special_members
base in all non-default constructors of _Hashtable.

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-07-22 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

--- Comment #2 from Martin Liška  ---
Created attachment 51197
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51197=edit
GCC 11 pre-processed source file

[Bug libstdc++/101583] [12 Regression] error: use of deleted function when building gold

2021-07-22 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101583

--- Comment #1 from Martin Liška  ---
Created attachment 51196
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51196=edit
GCC 12 pre-processed source file