[Bug c/78352] GCC lacks support for the Apple "blocks" extension to the C family of languages

2024-06-26 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78352

--- Comment #29 from Sergey Fedorov  ---
(In reply to Eric Gallager from comment #25)
> Cross-referencing against
> https://github.com/apple/swift-corelibs-libdispatch/issues/765

By the way, have you got some example code at hand which can serve as a test?
It must not require C/C++ 2011, of course.
I can try compiling it on 10.6 with its gcc.

[Bug c/78352] GCC lacks support for the Apple "blocks" extension to the C family of languages

2024-06-26 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78352

--- Comment #28 from Sergey Fedorov  ---
(In reply to Eric Gallager from comment #26)
> (In reply to Eric Gallager from comment #25)
> > Cross-referencing against
> > https://github.com/apple/swift-corelibs-libdispatch/issues/765
> 
> Note that there is some confusion in that issue about if/when Apple's GCC
> ever had c-blocks support; if someone knowledgeable on the topic could
> comment there, it'd be helpful.

It is perhaps of academic interest now, but I guess Iain will know for sure.

[Bug objc/50909] Process "#pragma options align=reset" correctly on Mac OS X

2024-06-16 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50909

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #17 from Sergey Fedorov  ---
(In reply to Rudolf from comment #12)
> This is still an issue... 7 YEARS LEATER!?
> I am using gcc 8.1.0. please fix this.

This is still an issue with gcc 13.

[Bug target/107590] __atomic_test_and_set broken on PowerPC

2024-06-13 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590

--- Comment #17 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #13)
> Oh yes there could be a bug here when the byte (lbarx/stbcx.) and half-word
> (lharx/sthcx.) instruction support was added (which was for Power8;
> r0-123873-g4b02c96265fb52).
> 
> But that was 9 years ago.
> Is powerpc-darwin really coming back in style or something?

Andrew, could you suggest a way to check if that was the issue? (I could
perhaps revert the whole commit, but that may be excessive, perhaps a more
precise change can be done?)

[Bug fortran/100662] intrinsic::ieee_arithmetic fails on aarch, powerpc architectures on FreeBSD

2024-06-13 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100662

--- Comment #18 from Sergey Fedorov  ---
(In reply to Piotr Kubaj from comment #16)
> This issue has been fixed in FreeBSD's main branch on powerpc* in
> https://cgit.freebsd.org/src/commit/
> ?id=448c505c33cc334193590f3844406d6a74f26e2a
> 
> Similar fix could be done for other affected architectures.

Piotr, could you say, are there test results for the current gfortran on
FreeBSD ppc32 somewhere? To have some meaningful reference.

[Bug libfortran/106083] gfortran.dg/ieee/large_1.f90 fails on powerpc64 with ieee longlongs

2024-06-13 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106083

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #1 from Sergey Fedorov  ---
FWIW, on Darwin ppc it fails for me on stop 47.

[Bug objc++/61759] [ICE] [objc++] reaching gcc_unreachable in objc_eh_runtime_type at objc/objc-next-runtime-abi-01.c

2024-03-18 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61759

--- Comment #17 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #15)

Iain, any chance of addressing this one?

If would have really helped with quite a number of usable software for PowerPC
(majority of which are 32-bit, and even on G5 not all software support ppc64
anyway).

[Bug target/105522] [powerpc-darwin] ICE: in decode_addr_const, at varasm.c:3059

2024-03-18 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

--- Comment #15 from Sergey Fedorov  ---
(In reply to Peter Bergner from comment #12)
> (In reply to Sergey Fedorov from comment #11)
> > (In reply to GCC Commits from comment #10)
> > > The master branch has been updated by Iain D Sandoe :
> > 
> > Iain, thank you very much for addressing this!
> 
> If this is fixed for you, can you please move this to RESOLVED / FIXED?

I will need to rebuild gcc13 and try it out, allow me some time please.

[Bug target/105522] [powerpc-darwin] ICE: in decode_addr_const, at varasm.c:3059

2024-03-18 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

--- Comment #14 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #13)
> fixed on trunk, intending to backport it.

Great! Once it is on your branches, hopefully Macports borrows the patch as
well.

[Bug middle-end/19779] IBM 128bit long double format is not constant folded.

2024-02-19 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19779

--- Comment #11 from Sergey Fedorov  ---
(In reply to Jakub Jelinek from comment #7)
> Unlikely to be ever fixed, at least Linux has migrated to IEEE quad long
> double on powerpc64le.

Perhaps several *BSDs and AIX are using IBM format though.

[Bug middle-end/19779] IBM 128bit long double format is not constant folded.

2024-02-19 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19779

--- Comment #6 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #0)
> This is the new bug for PR 19405. Keeping track of that we no longer
> constant fold long doubles in the 
> IBM 128bit long double format.

What is the current status of the issue?

[Bug target/107590] __atomic_test_and_set broken on PowerPC

2024-01-24 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590

--- Comment #16 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #13)
> Oh yes there could be a bug here when the byte (lbarx/stbcx.) and half-word
> (lharx/sthcx.) instruction support was added (which was for Power8;
> r0-123873-g4b02c96265fb52).

Any update on this by the way? It could be that we keep getting obscure
failures due to this issue being unfixed.

[Bug target/105522] [powerpc-darwin] ICE: in decode_addr_const, at varasm.c:3059

2024-01-18 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

--- Comment #11 from Sergey Fedorov  ---
(In reply to GCC Commits from comment #10)
> The master branch has been updated by Iain D Sandoe :

Iain, thank you very much for addressing this!

[Bug c++/59389] [C++11] bogus error: call of overloaded ‘Foo()’ is ambiguous

2024-01-03 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59389

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #6 from Sergey Fedorov  ---
Has this ever been addressed?

I am getting a similar-looking error with gcc-13.2.0 now:
https://github.com/NGSolve/ngsolve/issues/68

[Bug c/78352] GCC lacks support for the Apple "blocks" extension to the C family of languages

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

--- Comment #23 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #22)
> (In reply to Sergey Fedorov from comment #21)
> > Any chance of having it fixed in gcc14?
> 
> It is too late to be included in GCC 14, GCC is in stage 3 already, that is
> no new features can be included that was not posted before a specific date.
> See https://gcc.gnu.org/pipermail/gcc/2023-November/242898.html and
> https://gcc.gnu.org/develop.html about the timing there.

Oh…

Can new features be added into minor releases, like 14.x?

P. S. On a side note, I delayed forever my fixes for gfortran on PowerPC, will
return to that soonish, so we can get in into the master in a reasonable time.

[Bug c/78352] GCC lacks support for the Apple "blocks" extension to the C family of languages

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

--- Comment #21 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #20)
> 
> I recently brought my patches forward from GCC-5 => GCC-10 (easier to avoid
> the .c => .cc file renaming).  Since we now face some problems with
> sanitiser support without blocks, this is moved up the TODO.

Any chance of having it fixed in gcc14?

[Bug go/46986] Go is not supported on Darwin

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

--- Comment #49 from Sergey Fedorov  ---
If someone happens to have some WIP on this, more recent than 2012, please
share, if possible.

[Bug libstdc++/83662] std::aligned_alloc() not available

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

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #10 from Sergey Fedorov  ---
I just got the same error with gcc 12.3.0:
https://github.com/kokkos/kokkos/issues/6367

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_kokkos/kokkos-devel/work/kokkos-ca3687e637c12225e824ee626e69fc9fea8cebd2/core/src/impl/Kokkos_HostSpace.cpp:
In member function 'void* Kokkos::HostSpace::impl_allocate(const char*, size_t,
size_t, Kokkos::Tools::SpaceHandle) const':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_kokkos/kokkos-devel/work/kokkos-ca3687e637c12225e824ee626e69fc9fea8cebd2/core/src/impl/Kokkos_HostSpace.cpp:95:16:
error: 'aligned_alloc' is not a member of 'std'; did you mean 'aligned_union'?
   95 | ptr = std::aligned_alloc(alignment, size);
  |^
  |aligned_union
make[2]: *** [core/src/CMakeFiles/kokkoscore.dir/impl/Kokkos_HostSpace.cpp.o]
Error 1
make[2]: *** Waiting for unfinished jobs

Passing -std=c++17 does not help.

[Bug objc++/61759] [ICE] [objc++] reaching gcc_unreachable in objc_eh_runtime_type at objc/objc-next-runtime-abi-01.c

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

--- Comment #16 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #15)

Would be nice to have it fixed, otherwise `jack` is broken:
https://github.com/jackaudio/jack2/issues/950
Which, in turn, leaves broken dependencies.

[Bug objc++/61759] [ICE] [objc++] reaching gcc_unreachable in objc_eh_runtime_type at objc/objc-next-runtime-abi-01.c

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

--- Comment #14 from Sergey Fedorov  ---
(In reply to Eric Gallager from comment #8)

> I'd need to rebuild gcc with debug info to get a better backtrace.

Have you been able to?

[Bug objc++/61759] [ICE] [objc++] reaching gcc_unreachable in objc_eh_runtime_type at objc/objc-next-runtime-abi-01.c

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

--- Comment #13 from Sergey Fedorov  ---
Any update on this?

[Bug target/105522] [powerpc-darwin] ICE: in decode_addr_const, at varasm.c:3059

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

--- Comment #9 from Sergey Fedorov  ---
Just to update, GCC 12.3.0 exhibits the same error:

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2-snowleopard/libsdl2-snowleopard/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'create_usage_match':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2-snowleopard/libsdl2-snowleopard/work/SDL2-2.0.22/src/hidapi/mac/hid.c:407:21:
internal compiler error: in decode_addr_const, at varasm.cc:3083
  407 | const void *keys[2] = { (void *)
CFSTR(kIOHIDDeviceUsagePageKey), (void *) CFSTR(kIOHIDDeviceUsageKey) };
  | ^~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See  for instructions.
make: *** [build/SDL_hidapi.lo] Error 1

[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 target/110306] ICE when building ccache for powepc-apple-darwin: Logging.hpp: internal compiler error: Bus error: Logging::log(std::string_view(message_));

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

--- Comment #1 from Sergey Fedorov  ---
Created attachment 55361
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55361=edit
Preprocessed source file

[Bug target/110306] New: ICE when building ccache for powepc-apple-darwin: Logging.hpp: internal compiler error: Bus error: Logging::log(std::string_view(message_));

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

Bug ID: 110306
   Summary: ICE when building ccache for powepc-apple-darwin:
Logging.hpp: internal compiler error: Bus error:
Logging::log(std::string_view(message_));
   Product: gcc
   Version: 12.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---

:info:build [ 46%] Building CXX object
src/CMakeFiles/ccache_framework.dir/storage/local/LocalStorage.cpp.o
:info:build cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/build/src
&& /opt/local/bin/g++-mp-12 -DHAVE_REDIS_STORAGE_BACKEND
-DXXH_STATIC_LINKING_ONLY
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/build
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/ccache-4.8.2/src
-isystem /opt/local/include -pipe -Os -DNDEBUG
-isystem/opt/local/include/LegacySupport -I/opt/local/include
-D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17 -arch ppc -mmacosx-version-min=10.6
-include
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/build/config.h
-Wall -D_FILE_OFFSET_BITS=64 -MD -MT
src/CMakeFiles/ccache_framework.dir/storage/local/LocalStorage.cpp.o -MF
CMakeFiles/ccache_framework.dir/storage/local/LocalStorage.cpp.o.d -o
CMakeFiles/ccache_framework.dir/storage/local/LocalStorage.cpp.o -c
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/ccache-4.8.2/src/storage/local/LocalStorage.cpp
:info:build In file included from
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/ccache-4.8.2/src/storage/local/LocalStorage.cpp:25:
:info:build
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/ccache-4.8.2/src/storage/local/LocalStorage.cpp:
In instantiation of
'storage::local::LocalStorage::recompress(std::optional, uint32_t,
const storage::local::ProgressReceiver&):: [with auto:39 = unsigned char; auto:40 =
std::function]':
:info:build /opt/local/include/gcc12/c++/type_traits:2559:26:   required by
substitution of 'template static
std::__result_of_success()((declval<_Args>)()...)),
std::__invoke_other> std::__result_of_other_impl::_S_test(int) [with _Fn =
storage::local::LocalStorage::recompress(std::optional, uint32_t,
const storage::local::ProgressReceiver&)::&; _Args = {unsigned char, const std::function&}]'
:info:build /opt/local/include/gcc12/c++/type_traits:2570:55:   required from
'struct std::__result_of_impl, uint32_t,
const storage::local::ProgressReceiver&)::&, unsigned char, const std::function&>'
:info:build /opt/local/include/gcc12/c++/bits/std_function.h:348:9:  
recursively required by substitution of 'template
struct std::__is_invocable_impl<_Result, _Ret, true, std::__void_t > [with _Result =
std::__invoke_result, uint32_t, const storage::local::ProgressReceiver&)::&, unsigned char, const
std::function&>; _Ret = void]'
:info:build /opt/local/include/gcc12/c++/bits/std_function.h:348:9:   required
from 'struct std::function&)>::_Callable, uint32_t, const storage::local::ProgressReceiver&)::,
storage::local::LocalStorage::recompress(std::optional, uint32_t,
const storage::local::ProgressReceiver&)::,
std::__invoke_result, uint32_t, const storage::local::ProgressReceiver&)::&, unsigned char, const std::function&>
>'
:info:build /opt/local/include/gcc12/c++/bits/std_function.h:353:8:   required
by substitution of 'template template using _Requires = std::__enable_if_t<_Cond::value, _Tp> [with
_Cond = std::function&)>::_Callable, uint32_t, const storage::local::ProgressReceiver&)::,
storage::local::LocalStorage::recompress(std::optional, uint32_t,
const storage::local::ProgressReceiver&)::,
std::__invoke_result, uint32_t, const storage::local::ProgressReceiver&)::&, unsigned char, const std::function&>
>; _Tp = void; _Res = void; _ArgTypes = {unsigned char, const
std::function&}]'
:info:build /opt/local/include/gcc12/c++/bits/std_function.h:434:9:   required
by substitution of 'template
std::function&)>::function(_Functor&&) [with _Functor =
storage::local::LocalStorage::recompress(std::optional, uint32_t,
const storage::local::ProgressReceiver&)::; _Constraints = ]'
:info:build

[Bug target/110044] [10/11/12/13 Regression] #pragma pack(push, 1) may not force packing, while __attribute__((packed, aligned(1))) works

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

--- Comment #14 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #13)
> fixed on open branches (should be back-portable to earlier if anyone cares).

Awesome, thanks!

[Bug c/78352] GCC lacks support for the Apple "blocks" extension to the C family of languages

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

--- Comment #19 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #1)
> Just to add one note, which is that Apple's gcc-4.2.1 implementation for
> blocks was not actually submitted (and therefore doesn't exist on an FSF
> server);  it's my understanding that means we cannot use / forward port it.
> 
> I'm working on a new version - based on trying to match what clang's current
> code-gen produces.

Is this implementation of some use for us?
https://code.google.com/archive/p/plblocks/

[Bug target/110044] [10, 11, 12, 13, 14 Regression] #pragma pack(push, 1) may not force packing, while __attribute__((packed, aligned(1))) works

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

--- Comment #7 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #6)
> I'm going to test the following (which will take some time since the
> hardware is needed for testing releases too).
> 
> The test for AGGREGATE_TYPE_P() could actually be changed to
> RECORD_OR_UNION_TYPE_P () - since the case that we might have an array is
> handled for non-empty structs (but we do need to guard the empty struct
> case).  The problem seems to be we were ignoring that the field type could
> be packed or that there was a cap on the max alignment.
> 
> If it works as expected then I will apply to the open branches (hopefully
> before 10.5 is spun).
> 
> 
> 
> diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
> index 5b3b8b52e7e..e1c038da305 100644
> --- a/gcc/config/rs6000/rs6000.cc
> +++ b/gcc/config/rs6000/rs6000.cc
> @@ -8209,7 +8209,8 @@ darwin_rs6000_special_round_type_align (tree type,
> unsigned int computed,
>type = TREE_TYPE (type);
>} while (AGGREGATE_TYPE_P (type));
>  
> -  if (! AGGREGATE_TYPE_P (type) && type != error_mark_node)
> +  if (type != error_mark_node && ! AGGREGATE_TYPE_P (type)
> +  ! TYPE_PACKED(type) && maximum_field_alignment == 0)
>  align = MAX (align, TYPE_ALIGN (type));
>  
>return align;

Thank you for dealing with this!

[Bug target/110044] #pragma pack(push, 1) may not force packing, while __attribute__((packed, aligned(1))) works

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

--- Comment #3 from Sergey Fedorov  ---
(In reply to Eric Gallager from comment #2)
> possible dup of either bug 60972 and/or bug 68160?

>From those topics it looks that the bug, if identical, has never been addressed
since GCC 4.9. Would it be helpful to compare against Apple gcc code, which
seems to handle the issue correctly?

[Bug target/110044] New: #pragma pack(push, 1) may not force packing, while __attribute__((packed, aligned(1))) works

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

Bug ID: 110044
   Summary: #pragma pack(push, 1) may not force packing, while
__attribute__((packed, aligned(1))) works
   Product: gcc
   Version: 12.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc-apple-darwin

Problem: #pragma pack(push, 1) may not work correctly on ppc (32-bit); seems to
be present across GCC versions, confirmed to affect gcc7, gcc11 and gcc12.
Old Apple GCC 4.2 is not affected, at the same time.


Test code:

#include 
#include 

#pragma pack(push, 1)

/* struct from OpenEXR; should be packed with the pragma directive  */
typedef struct
{
uint32_t x_size;
uint32_t y_size;
uint8_t  level_and_round;
} exr_attr_tiledesc_t;

/* same struct but reordered */
typedef struct
{
uint8_t  level_and_round;
uint32_t x_size;
uint32_t y_size;
} new1_exr_attr_tiledesc_t;

/* same as first struct but with packed forced */
typedef struct
{
uint32_t x_size;
uint32_t y_size;
uint8_t  level_and_round;
} __attribute__((packed, aligned(1))) new2_exr_attr_tiledesc_t;

#pragma pack(pop)

int main() {
std::cout << sizeof(exr_attr_tiledesc_t) << " "
  << sizeof(new1_exr_attr_tiledesc_t) << " "
  << sizeof(new2_exr_attr_tiledesc_t) << "\n";

return 0;
}


On Mac OS X Leopart (10.5 PowerPC):
`g++-mp-7 main.cxx && ./a.out` gives: 12 9 9
`g++ main.cxx && ./a.out`  gives: 9  9 9
`g++* -arch ppc64 && ./a.out`  gives: 9 9 9

On Mac OS X Snow Leopard (10A190 PowerPC):
`g++-mp-11 main.cxx && ./a.out` gives: 12 9 9
`g++-mp-12 main.cxx && ./a.out` gives: 12 9 9
`g++ main.cxx && ./a.out`   gives: 9 9 9

where g++ stands for Xcode gcc-4.2.

Discussion in: https://github.com/macports/macports-ports/pull/18872
Also see: https://trac.macports.org/ticket/63490

[Bug c/63368] Provide an implementation for `__sync_val_compare_and_swap_8' on powerpc (32bits)

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

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #9 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #3)
> -latomic is there already.

It does not work with `__sync*` builtins. `__sync_val_compare_and_swap_8`
remains undefined on `ppc`.

[Bug target/59666] IBM long double arithmetic results invalid in non-default rounding modes

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

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #8 from Sergey Fedorov  ---
(In reply to Vincent Lefèvre from comment #1)
> (In reply to Joseph S. Myers from comment #0)
> It seems to be like that "by design" (though this is not satisfactory) and
> part of the ppc64 ABI for instance:
> 
> http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#PREC
> 
> "The software support is restricted to round-to-nearest mode. Programs that
> use extended precision must ensure that this rounding mode is in effect when
> extended-precision calculations are performed."

Also true for AIX:
https://www.ibm.com/docs/sr/xcafbg/9.0.0?topic=SS3KZ4_9.0.0/com.ibm.xlf111.bg.doc/xlfopg/fp-overview.html

Does anyone know whether this is also true for Darwin on PowerPC though?

[Bug testsuite/95706] New test case gfortran.dg/pr95690.f90 fails

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

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #15 from Sergey Fedorov  ---
Also happens on powerpc-apple-darwin with gcc13:

Executing on host:
/Users/svacchanda/GCC_test/gcc_devel/gcc/testsuite/gfortran1/../../gfortran
-B/Users/svacchanda/GCC_test/gcc_devel/gcc/testsuite/gfortran1/../../
-B/Users/svacchanda/GCC_test/gcc_devel/powerpc-apple-darwin10/./libgfortran/
/Users/svacchanda/GCC_sources/gcc-git/gcc/testsuite/gfortran.dg/pr95690.f90   
-fdiagnostics-plain-output  -fdiagnostics-plain-output-O   -pedantic-errors
-S -o pr95690.s(timeout = 300)
spawn -ignore SIGHUP
/Users/svacchanda/GCC_test/gcc_devel/gcc/testsuite/gfortran1/../../gfortran
-B/Users/svacchanda/GCC_test/gcc_devel/gcc/testsuite/gfortran1/../../
-B/Users/svacchanda/GCC_test/gcc_devel/powerpc-apple-darwin10/./libgfortran/
/Users/svacchanda/GCC_sources/gcc-git/gcc/testsuite/gfortran.dg/pr95690.f90
-fdiagnostics-plain-output -fdiagnostics-plain-output -O -pedantic-errors -S -o
pr95690.s

/Users/svacchanda/GCC_sources/gcc-git/gcc/testsuite/gfortran.dg/pr95690.f90:5:21:
Error: initializer for floating value is not a floating constant

compiler exited with status 1
FAIL: gfortran.dg/pr95690.f90   -O   (test for errors, line 6)
FAIL: gfortran.dg/pr95690.f90   -O  (test for excess errors)

[Bug bootstrap/42566] Bootstrap fails in stage3 building the libstdc++ PCH

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

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #13 from Sergey Fedorov  ---
Is --enable-decimal-float supported on PowerPC Darwin?? It seems that it is
not, and DFP have been added in ISA 2.05.

[Bug bootstrap/12596] configure setting --with-libiconv-prefix doesn't get passed to gcc-subdir

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

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #9 from Sergey Fedorov  ---
Got a similar error when trying to run testsuite on 10.6.8:

macmini:FORTRAN_TEST svacchanda$ cd /Users/svacchanda/FORTRAN_TEST/gcc make -j6
macmini:gcc svacchanda$ cd /Users/svacchanda/FORTRAN_TEST/gcc 
macmini:gcc svacchanda$ make -j6
if [ -f ../stage_final ] \
   && cmp -s ../stage_current ../stage_final; then \
  cp ../prev-gcc/cc1-checksum.cc cc1-checksum.cc; \
else \
  build/genchecksum c/c-lang.o c-family/stub-objc.o attribs.o
c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o
c/c-objc-common.o c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o
c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o
c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o
c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o darwin-c.o
rs6000-c.o libbackend.a main.o libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a ../libiberty/libiberty.a   ../libdecnumber/libdecnumber.a
../libbacktrace/.libs/libbacktrace.a \
 checksum-options > cc1-checksum.cc.tmp &&   \
 
/Users/svacchanda/Github_barracuda156/gcc-12-branch/gcc/../move-if-change
cc1-checksum.cc.tmp cc1-checksum.cc; \
fi
if [ -f ../stage_final ] \
   && cmp -s ../stage_current ../stage_final; then \
   cp ../prev-gcc/cc1plus-checksum.cc cc1plus-checksum.cc; \
else \
  build/genchecksum cp/cp-lang.o c-family/stub-objc.o cp/call.o
cp/class.o cp/constexpr.o cp/constraint.o cp/coroutines.o cp/cp-gimplify.o
cp/cp-objcp-common.o cp/cp-ubsan.o cp/cvt.o cp/cxx-pretty-print.o cp/decl.o
cp/decl2.o cp/dump.o cp/error.o cp/except.o cp/expr.o cp/friend.o cp/init.o
cp/lambda.o cp/lex.o cp/logic.o cp/mangle.o cp/mapper-client.o
cp/mapper-resolver.o cp/method.o cp/module.o cp/name-lookup.o cp/optimize.o
cp/parser.o cp/pt.o cp/ptree.o cp/rtti.o cp/search.o cp/semantics.o cp/tree.o
cp/typeck.o cp/typeck2.o cp/vtable-class-hierarchy.o attribs.o incpath.o
c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o
c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o
c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o
c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o
c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o
c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o
c-family/c-spellcheck.o darwin-c.o rs6000-c.o libbackend.a main.o
libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a ../libcody/libcody.a libcommon.a
../libcpp/libcpp.a ../libiberty/libiberty.a   ../libdecnumber/libdecnumber.a
../libbacktrace/.libs/libbacktrace.a \
 checksum-options > cc1plus-checksum.cc.tmp && \
 
/Users/svacchanda/Github_barracuda156/gcc-12-branch/gcc/../move-if-change
cc1plus-checksum.cc.tmp cc1plus-checksum.cc; \
fi
/Users/svacchanda/FORTRAN_TEST/./prev-gcc/xg++
-B/Users/svacchanda/FORTRAN_TEST/./prev-gcc/
-B/opt/svacchanda/gfortran-12-ppc/powerpc-apple-darwin10/bin/ -nostdinc++
-B/Users/svacchanda/FORTRAN_TEST/prev-powerpc-apple-darwin10/libstdc++-v3/src/.libs
-B/Users/svacchanda/FORTRAN_TEST/prev-powerpc-apple-darwin10/libstdc++-v3/libsupc++/.libs

-I/Users/svacchanda/FORTRAN_TEST/prev-powerpc-apple-darwin10/libstdc++-v3/include/powerpc-apple-darwin10

-I/Users/svacchanda/FORTRAN_TEST/prev-powerpc-apple-darwin10/libstdc++-v3/include
 -I/Users/svacchanda/Github_barracuda156/gcc-12-branch/libstdc++-v3/libsupc++
-L/Users/svacchanda/FORTRAN_TEST/prev-powerpc-apple-darwin10/libstdc++-v3/src/.libs
-L/Users/svacchanda/FORTRAN_TEST/prev-powerpc-apple-darwin10/libstdc++-v3/libsupc++/.libs
-no-pie   -g -O2 -mdynamic-no-pic -fno-checking -gtoggle -I/opt/local/include
-DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc 
-L/opt/local/lib -o f951 \
fortran/arith.o fortran/array.o fortran/bbt.o fortran/check.o
fortran/class.o fortran/constructor.o fortran/cpp.o fortran/data.o
fortran/decl.o fortran/dump-parse-tree.o fortran/error.o fortran/expr.o
fortran/interface.o fortran/intrinsic.o fortran/io.o fortran/iresolve.o
fortran/match.o fortran/matchexp.o fortran/misc.o 

[Bug libquadmath/85440] libquadmath and quadmath.h do not exist on ppc64

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

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #21 from Sergey Fedorov  ---
(In reply to Jakub Jelinek from comment #15)
> For libquadmath you need a working __float128 support.  On x86_64, i686 and
> ia64 this is done through a slow software emulation in libgcc.  On powerpc*,
> there is either a software emulation which requires VSX, or hardware
> implementation which requires power9.

On ppc64 (970) it probably is supported.

[Bug d/98058] libphobos: Support building on *-*-darwin*

2022-11-22 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98058

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #2 from Sergey Fedorov  ---
What is the current status of libphobos on powerpc*-apple-darwin?

[Bug target/107590] __atomic_test_and_set broken on PowerPC

2022-11-10 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590

--- Comment #15 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #13)
> Oh yes there could be a bug here when the byte (lbarx/stbcx.) and half-word
> (lharx/sthcx.) instruction support was added (which was for Power8;
> r0-123873-g4b02c96265fb52).

There was some argument re appropriateness lwarx etc. ages ago here:
https://lists.boost.org/Archives/boost//2005/04/83865.php
Though Peter Dimov said it is likely irrelevant.

> But that was 9 years ago.
> Is powerpc-darwin really coming back in style or something?

PPC is very much alive! :)
(Primarily thanks to Iain’s efforts with GCC – without a new GCC we could not
have done much. But yes, we have fixed some forever-broken stuff for PPC
recently, and process ongoing.)

[Bug target/107590] __atomic_test_and_set broken on PowerPC

2022-11-10 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590

--- Comment #12 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #2)
> >Reason: 259 at address: 0x3109
> 
> Yes that does seem like an alignment disagreement.
> 
> I suspect the code is broken for allocation and it is allocating unaligned
> structs.
> 
> Also inside gdb can you do the following:
> 
> disassemble $pc-0x10 $pc+0x10
> info registers

Here:

(gdb) run
Starting program: /Users/svacchanda/Dev/boost/a.out 
Reading symbols for shared libraries .. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 259 at address: 0x208d
0x1b38 in boost::detail::spinlock::try_lock (this=0x208d) at
spinlock_gcc_atomic.hpp:39
39  return __atomic_test_and_set( _, __ATOMIC_ACQUIRE ) == 0;
(gdb) disassemble $pc-0x10 $pc+0x10
Dump of assembler code from 0x1b28 to 0x1b48:
0x1b28 <_ZN5boost6detail8spinlock8try_lockEv+8>:mr  r30,r1
0x1b2c <_ZN5boost6detail8spinlock8try_lockEv+12>:   stw r3,72(r30)
0x1b30 <_ZN5boost6detail8spinlock8try_lockEv+16>:   lwz r2,72(r30)
0x1b34 <_ZN5boost6detail8spinlock8try_lockEv+20>:   li  r9,1
0x1b38 <_ZN5boost6detail8spinlock8try_lockEv+24>:   lwarx   r10,0,r2
0x1b3c <_ZN5boost6detail8spinlock8try_lockEv+28>:   stwcx.  r9,0,r2
0x1b40 <_ZN5boost6detail8spinlock8try_lockEv+32>:   bne-0x1b38
<_ZN5boost6detail8spinlock8try_lockEv+24>
0x1b44 <_ZN5boost6detail8spinlock8try_lockEv+36>:   isync
End of assembler dump.
(gdb) info registers
r0 0x19c4   6596
r1 0xb9f0   3221223920
r2 0x208d   8333
r3 0x208d   8333
r4 0xbb30   3221224240
r5 0xbb38   3221224248
r6 0xbb88   3221224328
r7 0xc  12
r8 0x0  0
r9 0x1  1
r100x0  0
r110x2048   8264
r120x1b20   6944
r130x0  0
r140x0  0
r150x0  0
r160x0  0
r170x0  0
r180x0  0
r190x0  0
r200x0  0
r210x0  0
r220x0  0
r230x0  0
r240x0  0
r250x0  0
r260xbb2c   3221224236
r270x8  8
r280x0  0
r290x0  0
r300xb9f0   3221223920
r310x19a8   6568
pc 0x1b38   6968
ps 0x1000f030   1152921504606908464
cr 0x2402   603979778
lr 0x1ba4   7076
ctr0x1b20   6944
xer0x0  0
mq 0x0  0
fpscr  0x0  0
vscr   0x1  65536
vrsave 0x0  0

[Bug target/107590] __atomic_test_and_set broken on PowerPC

2022-11-10 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590

--- Comment #11 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #8)
> No preprocessed source of the code going wrong.
> Not even register state or instructions where the segfault is happening
> (this is would be very useful but not required).

I am on 10.6 PPC (10A190) now and cannot reboot into 10.5.8, so attaching .ii
file from there, but the failure happens on Leopard just as well.

[Bug target/107590] __atomic_test_and_set broken on PowerPC

2022-11-10 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590

--- Comment #10 from Sergey Fedorov  ---
Created attachment 53876
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53876=edit
Preprocessed spinlock_test from 10.6

36-172% /opt/local/bin/g++-mp-11 --save-temps -v spinlock_test.cpp
-I/opt/local/libexec/boost/1.79/include -L/opt/local/libexec/boost/1.79/lib -o
spinlock_test
Using built-in specs.
COLLECT_GCC=/opt/local/bin/g++-mp-11
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/ppc-apple-darwin10/11.3.0/lto-wrapper
Target: ppc-apple-darwin10
Configured with:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/gcc-11.3.0/configure
--prefix=/opt/local --build=ppc-apple-darwin10
--enable-languages=c,c++,objc,obj-c++,lto,fortran,jit
--libdir=/opt/local/lib/gcc11 --includedir=/opt/local/include/gcc11
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-11 --with-local-prefix=/opt/local
--with-system-zlib --disable-nls --program-suffix=-mp-11
--with-gxx-include-dir=/opt/local/include/gcc11/c++/ --with-gmp=/opt/local
--with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local
--with-zstd=/opt/local --enable-stage1-checking --disable-multilib --enable-lto
--enable-libstdcxx-time --with-build-config=bootstrap-debug
--with-bugurl=https://trac.macports.org/newticket --enable-host-shared
--with-tune-cpu=G5 --disable-tls --with-as=/opt/local/bin/as
--with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar
--with-pkgversion='MacPorts gcc11 11.3.0_1'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (MacPorts gcc11 11.3.0_1) 
COLLECT_GCC_OPTIONS='-save-temps' '-v' '-I'
'/opt/local/libexec/boost/1.79/include' '-L/opt/local/libexec/boost/1.79/lib'
'-o' 'spinlock_test' '-mmacosx-version-min=10.6.0'
'-asm_macosx_version_min=10.6' '-nodefaultexport' '-shared-libgcc'
 /opt/local/libexec/gcc/ppc-apple-darwin10/11.3.0/cc1plus -E -quiet -v -I
/opt/local/libexec/boost/1.79/include -D__DYNAMIC__ spinlock_test.cpp -fPIC
-mmacosx-version-min=10.6.0 -fpch-preprocess -o spinlock_test.ii
ignoring nonexistent directory
"/opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/../../../../../ppc-apple-darwin10/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/local/libexec/boost/1.79/include
 /opt/local/include/gcc11/c++/
 /opt/local/include/gcc11/c++//ppc-apple-darwin10
 /opt/local/include/gcc11/c++//backward
 /opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/include
 /opt/local/include
 /opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
COLLECT_GCC_OPTIONS='-save-temps' '-v' '-I'
'/opt/local/libexec/boost/1.79/include' '-L/opt/local/libexec/boost/1.79/lib'
'-o' 'spinlock_test' '-mmacosx-version-min=10.6.0'
'-asm_macosx_version_min=10.6' '-nodefaultexport' '-shared-libgcc'
 /opt/local/libexec/gcc/ppc-apple-darwin10/11.3.0/cc1plus -fpreprocessed
spinlock_test.ii -fPIC -quiet -dumpbase spinlock_test.cpp -dumpbase-ext .cpp
-mmacosx-version-min=10.6.0 -version -o spinlock_test.s
GNU C++17 (MacPorts gcc11 11.3.0_1) version 11.3.0 (ppc-apple-darwin10)
compiled by GNU C version 11.3.0, GMP version 6.2.1, MPFR version
4.1.0, MPC version 1.2.1, isl version isl-0.25-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++17 (MacPorts gcc11 11.3.0_1) version 11.3.0 (ppc-apple-darwin10)
compiled by GNU C version 11.3.0, GMP version 6.2.1, MPFR version
4.1.0, MPC version 1.2.1, isl version isl-0.25-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: bb9117971f7aa7e0fe2b40679b3b256c
COLLECT_GCC_OPTIONS='-save-temps' '-v' '-I'
'/opt/local/libexec/boost/1.79/include' '-L/opt/local/libexec/boost/1.79/lib'
'-o' 'spinlock_test' '-mmacosx-version-min=10.6.0'  '-nodefaultexport'
'-shared-libgcc'
 /opt/local/bin/as -v -I /opt/local/libexec/boost/1.79/include -arch ppc -o
spinlock_test.o spinlock_test.s
Apple Inc version cctools-localbuild, GNU assembler version 1.38
COMPILER_PATH=/opt/local/libexec/gcc/ppc-apple-darwin10/11.3.0/:/opt/local/libexec/gcc/ppc-apple-darwin10/11.3.0/:/opt/local/libexec/gcc/ppc-apple-darwin10/:/opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/:/opt/local/lib/gcc11/gcc/ppc-apple-darwin10/
LIBRARY_PATH=/opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/:/opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0/../../../
COLLECT_GCC_OPTIONS='-save-temps' '-v' '-I'
'/opt/local/libexec/boost/1.79/include' '-L/opt/local/libexec/boost/1.79/lib'
'-o' 'spinlock_test' '-mmacosx-version-min=10.6.0'  '-nodefaultexport'
'-shared-libgcc' '-dumpdir' 'spinlock_test.'
 /opt/local/libexec/gcc/ppc-apple-darwin10/11.3.0/collect2 -dynamic -arch ppc
-macosx_version_min 10.6.0 -o spinlock_test -lcrt1.10.5.o
-L/opt/local/libexec/boost/1.79/lib
-L/opt/local/lib/gcc11/gcc/ppc-apple-darwin10/11.3.0

[Bug target/107590] __atomic_test_and_set broken on PowerPC

2022-11-09 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590

--- Comment #3 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #2)
> >Reason: 259 at address: 0x3109
> 
> Yes that does seem like an alignment disagreement.
> 
> I suspect the code is broken for allocation and it is allocating unaligned
> structs.

The code in Boost shared pointer tests looks pretty simple. Since the bus error
happens on those, no need to look into i2pd case.
I don’t really know how alignment works there, but hopefully someone can look
at that.

But the error was reproducible on several tests plus i2pd itself. All fixed by
switching to Boost own atomics. I am not qualified to judge if the code is
broken, but this looks like it is worth investigation.

> Also inside gdb can you do the following:
> 
> disassemble $pc-0x10 $pc+0x10
> info registers

I could try that tomorrow, provided an ancient GBD we have on PPC supports
that.

[Bug target/107590] New: __atomic_test_and_set broken on PowerPC

2022-11-09 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107590

Bug ID: 107590
   Summary: __atomic_test_and_set broken on PowerPC
   Product: gcc
   Version: 11.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc-apple-darwin

The bug was discovered while trying to build i2pd on Darwin PPC. Build itself
succeeded, but the binary failed with Bus error. I thought it was caused by
Boost, however it turned out that Boost was fine, while Bus error was a result
of broken GCC builtin.

Details here:
https://github.com/PurpleI2P/i2pd/issues/1726#issuecomment-1305536144

In particular, simple spin lock tests fail with Bus error when built with
default usage of GCC atomics. Like this:
https://github.com/boostorg/smart_ptr/blob/develop/test/spinlock_test.cpp

36-87:boost svacchanda$ /opt/local/bin/g++-mp-11 spinlock_test.cpp
-I/opt/local/libexec/boost/1.76/include -L/opt/local/libexec/boost/1.76/lib -o
spinlock_test
36-87:boost svacchanda$ /Users/svacchanda/Dev/boost/spinlock_test 
Bus error
36-87:boost svacchanda$ /opt/local/bin/g++-mp-11 spinlock_test.cpp
-DBOOST_SP_USE_STD_ATOMIC -I/opt/local/libexec/boost/1.76/include
-L/opt/local/libexec/boost/1.76/lib -o spinlock_test
36-87:boost svacchanda$ /Users/svacchanda/Dev/boost/spinlock_test

No error when Boost is forced to use its own atomics instead of GCC builtins.

Boost developer suggested that __atomic_test_and_set is broken on PPC, and GDB
output proved that:

(gdb) run
Starting program: /Users/svacchanda/Dev/boost/a.out 
Reading symbols for shared libraries +++. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 259 at address: 0x208d
0x1b2c in boost::detail::spinlock::try_lock (this=0x208d) at
spinlock_gcc_atomic.hpp:39
39  return __atomic_test_and_set( _, __ATOMIC_ACQUIRE ) == 0;
(gdb) quit

Same failure confirmed on 10.5.8 and 10.6. gcc11 and gcc7 were tried, likely to
apply to other versions.

GCC output from 10.5.8:

Using built-in specs.
COLLECT_GCC=/opt/local/bin/gcc-mp-11
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/ppc-apple-darwin9/11.3.0/lto-wrapper
Target: ppc-apple-darwin9
Configured with:
/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc11/gcc11/work/gcc-11.3.0/configure
--prefix=/opt/local --build=ppc-apple-darwin9
--enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc11
--includedir=/opt/local/include/gcc11 --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-11
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-11 --with-gxx-include-dir=/opt/local/include/gcc11/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--with-isl=/opt/local --with-zstd=/opt/local --enable-stage1-checking
--enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug
--with-bugurl=https://trac.macports.org/newticket --enable-host-shared
--with-tune-cpu=G5 --disable-tls --with-as=/opt/local/bin/as
--with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar
--with-pkgversion='MacPorts gcc11 11.3.0_1+universal'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (MacPorts gcc11 11.3.0_1+universal)

[Bug c/78352] GCC lacks support for the Apple "blocks" extension to the C family of languages

2022-11-05 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78352

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #18 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #15)
> Sorry that there hasn't been much progress on this - it *was* top of my
> GCC11 TODO list, and then Apple Si. came along and torpedoed that...

Any updates ever since? It seems that we need blocks to build libdispatch, and
we need libdispatch on PPC to build some useful stuff.

[Bug objc++/61759] [ICE] [objc++] reaching gcc_unreachable in objc_eh_runtime_type at objc/objc-next-runtime-abi-01.c

2022-11-04 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61759

--- Comment #12 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #11)
> *** Bug 107530 has been marked as a duplicate of this bug. ***

I.e. gcc12 has the same bug too.

[Bug objc++/107530] ICE: in objc_eh_runtime_type, at objc/objc-next-runtime-abi-01.cc:2795

2022-11-04 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107530

--- Comment #2 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #1)
> Dup of bug 61759
> 
> *** This bug has been marked as a duplicate of bug 61759 ***

I guess then it is worth adding gcc12 to confirmed to fail list there.

[Bug target/107530] New: ICE: in objc_eh_runtime_type, at objc/objc-next-runtime-abi-01.cc:2795

2022-11-04 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107530

Bug ID: 107530
   Summary: ICE: in objc_eh_runtime_type, at
objc/objc-next-runtime-abi-01.cc:2795
   Product: gcc
   Version: 12.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc-apple-darwin

Created attachment 53830
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53830=edit
Output on 10.6.8

While building jack for ppc32 with gcc12, I got this error:

during GIMPLE pass: eh
In file included from ../macosx/coreaudio/JackCoreAudioDriver.mm:29:
../common/JackLockedEngine.h: In member function 'int
Jack::JackLockedEngine::PortRegister(int, const char*, const char*, unsigned
int, unsigned int, jack_port_id_t*)':
../common/JackLockedEngine.h:196:13: internal compiler error: in
objc_eh_runtime_type, at objc/objc-next-runtime-abi-01.cc:2795
  196 | int PortRegister(int refnum, const char* name, const char
*type, unsigned int flags, unsigned int buffer_size, jack_port_id_t* port)
  | ^~~~

Identical error on 10.6.8 Rosetta (for which I attach .mii file) and 10.6 PPC
(10A190).

Output file produced with:

/opt/local/bin/g++-mp-12 -save-temps -v -pipe -Os -arch ppc -Wall
-Wno-invalid-offsetof -std=gnu++11 -Wno-deprecated-register -fPIC -I. -I..
-Icommon -I../common -Icommon/jack -I../common/jack -Imacosx -I../macosx
-Iposix -I../posix -DAFTEN=1 -DHAVE_DOXYGEN=0 -DHAVE_ALSA=0 -DHAVE_FIREWIRE=0
-DHAVE_IIO=0 -DHAVE_PORTAUDIO=0 -DHAVE_WINMME=0 -DHAVE_CELT=0
-DHAVE_EXAMPLE_TOOLS=0 -DHAVE_OPUS=0 -DHAVE_SAMPLERATE=1 -DHAVE_SNDFILE=1
-DHAVE_READLINE=0 -DHAVE_SYSTEMD=0 -DHAVE_DB=0 -DHAVE_ZALSA=0 -DHAVE_ALLOCA_H=1
-DHAVE_EXECINFO_H=1 -DUSE_CLASSIC_AUTOLAUNCH=1 -DCLIENT_NUM=256
-DPORT_NUM_FOR_CLIENT=2048 -DADDON_DIR="/opt/local/lib/jack"
-DJACK_LOCATION="/opt/local/bin" -DUSE_POSIX_SHM=1 -DJACKMP=1 -DHAVE_CONFIG_H
-DSERVER_SIDE ../macosx/coreaudio/JackCoreAudioDriver.mm -c
-o/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_jack/jack/work/jack2-1.9.21/build/macosx/coreaudio/JackCoreAudioDriver.mm.7.o
-I/opt/local/include

gcc info:

COLLECT_GCC=/opt/local/bin/g++-mp-12
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/powerpc-apple-darwin10/12.2.0/lto-wrapper
Target: powerpc-apple-darwin10
Configured with:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc12/gcc12/work/gcc-12.2.0/configure
--prefix=/opt/local --build=powerpc-apple-darwin10
--enable-languages=c,c++,objc,obj-c++,lto,fortran,jit
--libdir=/opt/local/lib/gcc12 --includedir=/opt/local/include/gcc12
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-12 --with-local-prefix=/opt/local
--with-system-zlib --disable-nls --program-suffix=-mp-12
--with-gxx-include-dir=/opt/local/include/gcc12/c++/ --with-gmp=/opt/local
--with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local
--with-zstd=/opt/local --enable-checking=release --disable-multilib
--enable-lto --enable-libstdcxx-time --without-build-config
--with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc
--with-libiconv-prefix=/opt/local --disable-tls --with-pkgversion='MacPorts
gcc12 12.2.0_0'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (MacPorts gcc12 12.2.0_0)

[Bug target/105522] [powerpc-darwin] ICE: in decode_addr_const, at varasm.c:3059

2022-10-31 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

--- Comment #8 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #6)
> it seems to fail "forever" (at least back to 5.5)

Any chance of fixing this before the next update of GCC?

[Bug go/46986] Go is not supported on Darwin

2022-10-30 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

--- Comment #47 from Sergey Fedorov  ---
(In reply to Ian Lance Taylor from comment #46)
> A small bit of work is needed on the codegen, to read and write the export
> data.  And some work is required on the runtime, to clean it up to support
> Darwin.  It has to be done by someone with access to a modern Darwin system.

I could do something on this, perhaps, provided it is not overly demanding in
terms of expertise. Or do those parts which are such :)

While I have more interest in Darwin PPC, since Go is broken there (ppc32
support exists in out-of-tree branch of Go 1.9, though not for Darwin, however
the only Go bootstrappable from C, 1.4, is x86-only), access to modern x86_64
Darwin is there.

[Bug go/46986] Go is not supported on Darwin

2022-10-30 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #43 from Sergey Fedorov  ---
What is the current status of gccgo on Darwin?

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-28 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177

--- Comment #22 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #19)
> Created attachment 53779 [details]
> introduce ppc_intrinsics.h for powerpc*-darwin.
> 
> This takes the header from the GCC-4.x apple debt branch (as present in SVN:
> r113478) and 
>  - updates the license.
>  - installs for powerpc*-darwin
> 
> It needs the test cases forward porting too.
> However, it would be good to know if this solves the problems folks have
> encountered here (if other ports want to try it, why only need to amend
> their entry in gcc/config.gcc)

Thank you! I will try it.

[Bug target/93177] PPC: Missing many useful platform intrinsics

2022-10-26 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93177

--- Comment #16 from Sergey Fedorov  ---
For Darwin, PPC intrinsics already is there in Apple headers. Can it be added
into current GCC?

[Bug c++/105584] libcxx needs using_if_exist attribute

2022-10-20 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105584

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #4 from Sergey Fedorov  ---
(In reply to Jonathan Wakely from comment #3)
> libc++ should be using __has_cpp_attribute if they still expect to build
> with GCC.

Wouldn’t it benefit GCC if we add extra support?

[Bug target/107155] New: ppc_intrinsics is missing

2022-10-04 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107155

Bug ID: 107155
   Summary: ppc_intrinsics is missing
   Product: gcc
   Version: 12.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc-apple-darwin

Some ports ask for intrinsics header, however GCC12 currently has only
`ppu_intrinsics.h` for Cell, no `ppc_intrinsics.h` is there.
`ppc_intrinsics.h` existed in earlier GCC and likely can (and should) be
implemented into the current GCC.

[Bug fortran/100662] intrinsic::ieee_arithmetic fails on aarch, powerpc architectures on FreeBSD

2022-09-10 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100662

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #17 from Sergey Fedorov  ---
The same failure happens on MacOS PPC with GCC12:

/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/integration/pde_solvers/coarrayBurgers/main.F90:3:20:

3 |   use, intrinsic :: ieee_arithmetic, only : ieee_is_nan
  |1
Fatal Error: Cannot find an intrinsic module named 'ieee_arithmetic' at (1)
compilation terminated.
Error: command:
   `/opt/local/bin/mpif90-mpich-gcc12
-I/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/build/include/OpenCoarrays-2.10.0_GNU-12.2.0
-fcoarray=lib -DGCC_GE_7 -DGCC_GE_8 -DHAVE_MPI -DMPI_WORKING_MODULE
-DPREFIX_NAME=_gfortran_caf_
-I/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/build/src/tests/integration/pde_solvers/coarrayBurgers/library
-pipe -Os -m32 -mmacosx-version-min=10.6 -c
/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/integration/pde_solvers/coarrayBurgers/main.F90
-o CMakeFiles/coarray_burgers_pde.dir/main.F90.o`
failed to compile.

[Bug fortran/29383] Fortran 2003/F95[TR15580:1999]: Floating point exception (IEEE) support

2022-09-10 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29383

Sergey Fedorov  changed:

   What|Removed |Added

 CC||vital.had at gmail dot com

--- Comment #20 from Sergey Fedorov  ---
I just got the same error when building OpenCoarrays on 10.6.8 for ppc32:

/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/integration/pde_solvers/coarrayBurgers/main.F90:3:20:

3 |   use, intrinsic :: ieee_arithmetic, only : ieee_is_nan
  |1
Fatal Error: Cannot find an intrinsic module named 'ieee_arithmetic' at (1)
compilation terminated.
Error: command:
   `/opt/local/bin/mpif90-mpich-gcc12
-I/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/build/include/OpenCoarrays-2.10.0_GNU-12.2.0
-fcoarray=lib -DGCC_GE_7 -DGCC_GE_8 -DHAVE_MPI -DMPI_WORKING_MODULE
-DPREFIX_NAME=_gfortran_caf_
-I/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/build/src/tests/integration/pde_solvers/coarrayBurgers/library
-pipe -Os -m32 -mmacosx-version-min=10.6 -c
/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/integration/pde_solvers/coarrayBurgers/main.F90
-o CMakeFiles/coarray_burgers_pde.dir/main.F90.o`
failed to compile.

[Bug target/105710] ICE on powerpc darwin with TLS enabled

2022-05-24 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105710

--- Comment #9 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #8)
> If we try to do this for every irrelevant configure option, that's going to
> be quite a lot of work.
> 
> Really [IMO, at least], configure options are not intended for end-users 
> - the goal for end users is that:
> 
>  configure --prefix=xx && make && install
> 
> should 'just work' (OK, we don't quite achieve that, but actually we're
> quite close)
> 
> adding out-of-band configure options is for distributions and expert use
> (we assume distributions are expert in the options they need to apply to 
> customise the install).
> 
> However, of course, if you want to write patches to respond to all the
> options
> that Darwin does not need, I'm happy to review :)

I agree with Iain here, in fact it is a problem with Macports, since it’s
`--disable-tls` option lists a reason totally unrelated to PPC or Darwin
version:

># see https://lists.macports.org/pipermail/macports-dev/2017-August/036209.html
># --disable-tls does not limit functionality
># it only determines how std::call_once works
>configure.args-append \
>--disable-tls

Then it was me who misunderstood Iain’s reply in my PR to Ruby. I thought that
Macports disables TLS for no clear reason, while Ruby wants it provided by the
compiler, and tried to build it with `--enable-tls`.
Sorry for a confusion. I just had an impression that all ICEs have to be
reported.

[Bug target/105710] ICE on powerpc darwin with TLS enabled

2022-05-24 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105710

--- Comment #6 from Sergey Fedorov  ---

> Correct (even if it did exist it would only be for 10.7+) so --enable-tls is
> a configuration error.
> 
> (as I have said several times, the idea of configure is to choose the
> correct settings for the target _automatically_ - extra config options
> should only be added if there is a very good reason and you know exactly
> what they do).

Got it, thank you!

[Bug target/105710] ICE on powerpc darwin with TLS enabled

2022-05-23 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105710

--- Comment #4 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #3)
> (In reply to Sergey Fedorov from comment #2)
> > (In reply to Andrew Pinski from comment #1)
> > > >TLS enabled
> > > 
> > > TLS support for powerpc darwin was never added.
> > 
> > Iain writes that emulated TLS is supported on all Darwin versions starting
> > from 10.5:
> > https://github.com/ruby/ruby/pull/
> > 5927?notification_referrer_id=NT_kwDOBXwLlrMzNjYyMzQ0NjYzOjkyMDE1NTEw#issueco
> > mment-1133843490
> 
> That is enabled by default though --enable-tls tries to enable native TLS
> support.

>From what I understand, native TLS does not exist with gcc, at least for
Darwin.

[Bug target/105710] ICE on powerpc darwin with TLS enabled

2022-05-23 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105710

--- Comment #2 from Sergey Fedorov  ---
(In reply to Andrew Pinski from comment #1)
> >TLS enabled
> 
> TLS support for powerpc darwin was never added.

Iain writes that emulated TLS is supported on all Darwin versions starting from
10.5:
https://github.com/ruby/ruby/pull/5927?notification_referrer_id=NT_kwDOBXwLlrMzNjYyMzQ0NjYzOjkyMDE1NTEw#issuecomment-1133843490

[Bug libitm/105710] New: libitm/alloc_c.cc:40:1: internal compiler error: in extract_insn, at recog.c:2770

2022-05-23 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105710

Bug ID: 105710
   Summary: libitm/alloc_c.cc:40:1: internal compiler error: in
extract_insn, at recog.c:2770
   Product: gcc
   Version: 11.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libitm
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc-apple-darwin

Created attachment 53026
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53026=edit
ii file produced with -v -save-temps

I have tried to rebuild gcc11 @11.3.0 with TLS enabled on 10.6 PPC, and it
failed in stage 3 on libitm:

checking for freelocale...
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/gcc-11.3.0/libitm/alloc_c.cc:
In function 'void* _ITM_malloc(size_t)':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/gcc-11.3.0/libitm/alloc_c.cc:40:1:
error: unrecognizable insn:
   40 | }
  | ^
(insn 23 22 24 4 (set (reg:SI 3 r3)
(unspec:SI [
(symbol_ref:SI ("_ZN3GTM12_gtm_thr_tlsE") [flags 0x1252]
)
(reg:SI 126)
] UNSPEC_TLSGD))
"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/gcc-11.3.0/libitm/config/generic/tls.h":52:59
-1
 (nil))
during RTL pass: vregs
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/gcc-11.3.0/libitm/alloc_c.cc:40:1:
internal compiler error: in extract_insn, at recog.c:2770
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[4]: *** [alloc_c.lo] Error 1
make[4]: *** Waiting for unfinished jobs
yes
mv -f .deps/alloc.Tpo .deps/alloc.Plo
checking for uselocale... mv -f .deps/aatree.Tpo .deps/aatree.Plo
make[4]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/build/ppc-apple-darwin10/libitm'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/build/ppc-apple-darwin10/libitm'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_gcc11/gcc11/work/build/ppc-apple-darwin10/libitm'
make[1]: *** [all-target-libitm] Error 2

P. S. Yes, this is a non-standard OS version, but the same version of gcc11
built just fine with TLS disabled on it.

[Bug target/105522] [powerpc-darwin] ICE: in decode_addr_const, at varasm.c:3059

2022-05-08 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

--- Comment #7 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #6)
> it seems to fail "forever" (at least back to 5.5)
> 
> minimal reproducer:
> 
> typedef const struct __CFString * CFStringRef;
> 
> static void
> create_usage_match(const unsigned int page, const unsigned int usage, int
> *okay)
> {
> 
>  const void *keys[2] = 
>{ (void *) ((CFStringRef) __builtin___CFStringMakeConstantString (""
> "DeviceUsagePage" ""))
>, (void *) ((CFStringRef) __builtin___CFStringMakeConstantString (""
> "DeviceUsage" ""))
>};
> 
> }

Oh wow. Surprising that it never got caught until gcc11.

P. S. Thank you very much for dealing with this!

[Bug target/105522] gcc11: internal compiler error: in decode_addr_const, at varasm.c:3059

2022-05-08 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

--- Comment #5 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #4)
> I can repeat this with the 11.3-darwin-r0 release build on powwerpc-darwin9.
> 
> Do you happen to know if this previously worked with GCC 11 and/or earlier,
> if so please could you identify what the last known working version was. 
> Thanks.

Unfortunately, no. I will try to test it and provide an update in awhile. (The
technical difficulty is that due to changes in libgcc, I only have 11.3.0
working on 10.6, and on 10.5.8 the port doesn’t yet build for different
reasons.)

[Bug target/105522] gcc11: internal compiler error: in decode_addr_const, at varasm.c:3059

2022-05-08 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

--- Comment #3 from Sergey Fedorov  ---
Created attachment 52939
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52939=edit
save-temps file

[Bug target/105522] gcc11: internal compiler error: in decode_addr_const, at varasm.c:3059

2022-05-08 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

--- Comment #2 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #1)
> I am not going to be able to make any progress on this without a .i file (it
> is not an error that I've seen in any testing).
> 
> 
> 
> > CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.i: No such file or directory
> 
> Perhaps that directory has not been created at the time you are trying to
> run the command...
> 
> please take the -save-temps command and see if you can simplify it to just
> get it to produce output in the current directory.

I am sorry, I stupidly ran command from a wrong directory. I produced the file
now.

[Bug target/105522] New: gcc11: internal compiler error: in decode_addr_const, at varasm.c:3059

2022-05-08 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105522

Bug ID: 105522
   Summary: gcc11: internal compiler error: in decode_addr_const,
at varasm.c:3059
   Product: gcc
   Version: 11.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc-apple-darwin

Created attachment 52938
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52938=edit
Build log in a case needed

```
36-111% /opt/local/bin/gcc-mp-11 -DSDL2_EXPORTS -DUSING_GENERATED_CONFIG_H
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/build/include
-I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/include
-pipe -Os -DNDEBUG -I/opt/local/include -idirafter
"/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/video/khronos"
-I/opt/local/include/libusb-1.0 -D_THREAD_SAFE -Wshadow -fvisibility=hidden
-Wdeclaration-after-statement -fno-strict-aliasing -Wall  -arch ppc
-mmacosx-version-min=10.6 -fPIC -MD -MT
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o -MF
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o.d -o
CMakeFiles/SDL2.dir/src/hidapi/SDL_hidapi.c.o -c
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c
In file included from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c:578:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'PLATFORM_free_hid_device':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:163:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  163 | struct input_report *rpt = dev->input_reports;
  | ^~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'get_string_property':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:265:17:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  265 | CFIndex str_len = CFStringGetLength(str);
  | ^~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:269:17:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  269 | CFIndex used_buf_len;
  | ^~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'get_string_property_utf8':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:304:17:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  304 | CFIndex str_len = CFStringGetLength(str);
  | ^~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:308:17:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  308 | CFIndex used_buf_len;
  | ^~~
In file included from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/SDL_hidapi.c:578:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'PLATFORM_hid_enumerate':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:530:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  530 | CFSetRef device_set = IOHIDManagerCopyDevices(hid_mgr);
  | ^~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:540:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  540 | IOHIDDeviceRef *device_array =
(IOHIDDeviceRef*)calloc(num_devices, sizeof(IOHIDDeviceRef));
  | ^~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:
In function 'PLATFORM_read_thread':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libsdl2/libsdl2/work/SDL2-2.0.22/src/hidapi/mac/hid.c:742:9:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  742 | 

[Bug target/104117] [9,10,11,12 Regression] Darwin ppc64 uses invalid non-PIC address to access constants (in PIC code).

2022-02-10 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104117

--- Comment #22 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #20)
> On testing, this is not sufficient - one ends up with ICEs when we reject a
> valid (UNSPEC-wrapped) address here.  So I think that the slightly more
> elaborate target changes are required - but the LRA change seems fine!
> ... reg-straps on this old h/w take > 1 day .. so some more time will be
> needed for a complete answer.

Once you decide the patch is ready for testing, please let me know, I will test
it on my end too (for icu and R both).
And thank you so much indeed.

[Bug target/104117] [9,10,11,12 Regression] Darwin ppc64 uses invalid non-PIC address to access constants (in PIC code).

2022-02-06 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104117

--- Comment #18 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #17)
> FTR: this is the patch I came up with:

Does it affect only ppc64? I am asking since if it affects ppc32, then I rather
rebuild gcc10ppc and gcc11ppc installed on 10.6.8 Rosetta and on 10A190. While
if it matters only for ppc64, then rebuilding on 10.5.8 is enough.

[Bug target/104117] [9,10,11,12 Regression] Darwin ppc64 uses invalid non-PIC address to access constants (in PIC code).

2022-02-05 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104117

--- Comment #14 from Sergey Fedorov  ---
(In reply to Vladimir Makarov from comment #13)
> I think there are two code spots whose pitfalls resulted in the PR.
> 
> The first one is in rs6000.cc::legitimate_lo_sum_address_p which permits
> wrong pic low-sum address.
> 
> Another one is in lra-constraints.cc::process_address_1 which permits put
> wrong low-sum address in reg and use the reg in memory.
> 
> The following patch solves the problem:


Does this also address Bug 104118?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104118

[Bug target/104183] New: gcc6 error with building icu for ppc64

2022-01-22 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104183

Bug ID: 104183
   Summary: gcc6 error with building icu for ppc64
   Product: gcc
   Version: 6.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc64-apple-darwin9.8.0

Created attachment 52266
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52266=edit
ii files for errors

Build fails with the following:

ld: duplicate symbol
icu_67::number::NumberFormatterSettings::copyErrorTo(UErrorCode&)
const in number_skeletons.o and number_fluent.o
collect2: error: ld returned 1 exit status
make[1]: *** [../lib/libicui18n.67.1.dylib] Error 1
make: *** [all-recursive] Error 2

Commands producing the faulty objects:

/opt/local/bin/g++-mp-6 -m64 -O2 -DU_ATTRIBUTE_DEPRECATED=
-DU_I18N_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I.
-I../common -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings
-Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c -dynamic -MMD -MT
"number_skeletons.d number_skeletons.o number_skeletons.ao" -o
number_skeletons.o number_skeletons.cpp

/opt/local/bin/g++-mp-6 -m64 -O2 -DU_ATTRIBUTE_DEPRECATED=
-DU_I18N_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I.
-I../common -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings
-Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c -dynamic -MMD -MT
"number_fluent.d number_fluent.o number_fluent.ao" -o number_fluent.o
number_fluent.cpp

P. S. Error unrelated to Macports, I have redone the build outside with cleared
path, and it fails identically. ii files in attachment are from the build
outside of Macports.

[Bug target/104117] [9,10,11,12 Regression] Darwin ppc64 uses invalid non-PIC address to access constants (in PIC code).

2022-01-22 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104117

--- Comment #12 from Sergey Fedorov  ---
Not sure if the error is related, but trying to build icu with gcc6 in Macports
gives this:

/opt/local/bin/g++-mp-6 -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION
-DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../common -pipe -Os -m32
-D_GLIBCXX_USE_CXX11_ABI=0 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings
-Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c -dynamic -MMD -MT
"formatted_string_builder.d formatted_string_builder.o
formatted_string_builder.ao" -o formatted_string_builder.o
formatted_string_builder.cpp
ar r -c ../lib/libicui18n.a ucln_in.ao fmtable.ao format.ao msgfmt.ao umsg.ao
numfmt.ao unum.ao decimfmt.ao dcfmtsym.ao fmtable_cnv.ao choicfmt.ao datefmt.ao
smpdtfmt.ao reldtfmt.ao dtfmtsym.ao udat.ao dtptngen.ao udatpg.ao nfrs.ao
nfrule.ao nfsubs.ao rbnf.ao numsys.ao unumsys.ao ucsdet.ao ucal.ao calendar.ao
gregocal.ao timezone.ao simpletz.ao olsontz.ao astro.ao taiwncal.ao buddhcal.ao
persncal.ao islamcal.ao japancal.ao gregoimp.ao hebrwcal.ao indiancal.ao
chnsecal.ao cecal.ao coptccal.ao dangical.ao ethpccal.ao coleitr.ao coll.ao
sortkey.ao bocsu.ao ucoleitr.ao ucol.ao ucol_res.ao ucol_sit.ao collation.ao
collationsettings.ao collationdata.ao collationtailoring.ao
collationdatareader.ao collationdatawriter.ao collationfcd.ao
collationiterator.ao utf16collationiterator.ao utf8collationiterator.ao
uitercollationiterator.ao collationsets.ao collationcompare.ao
collationfastlatin.ao collationkeys.ao rulebasedcollator.ao collationroot.ao
collationrootelements.ao collationdatabuilder.ao collationweights.ao
collationruleparser.ao collationbuilder.ao collationfastlatinbuilder.ao
listformatter.ao ulistformatter.ao strmatch.ao usearch.ao search.ao stsearch.ao
translit.ao utrans.ao esctrn.ao unesctrn.ao funcrepl.ao strrepl.ao tridpars.ao
cpdtrans.ao rbt.ao rbt_data.ao rbt_pars.ao rbt_rule.ao rbt_set.ao nultrans.ao
remtrans.ao casetrn.ao titletrn.ao tolowtrn.ao toupptrn.ao anytrans.ao
name2uni.ao uni2name.ao nortrans.ao quant.ao transreg.ao brktrans.ao
regexcmp.ao rematch.ao repattrn.ao regexst.ao regextxt.ao regeximp.ao uregex.ao
uregexc.ao ulocdata.ao measfmt.ao currfmt.ao curramt.ao currunit.ao measure.ao
utmscale.ao csdetect.ao csmatch.ao csr2022.ao csrecog.ao csrmbcs.ao csrsbcs.ao
csrucode.ao csrutf8.ao inputext.ao wintzimpl.ao windtfmt.ao winnmfmt.ao
basictz.ao dtrule.ao rbtz.ao tzrule.ao tztrans.ao vtzone.ao zonemeta.ao
standardplural.ao upluralrules.ao plurrule.ao plurfmt.ao selfmt.ao dtitvfmt.ao
dtitvinf.ao udateintervalformat.ao tmunit.ao tmutamt.ao tmutfmt.ao currpinf.ao
uspoof.ao uspoof_impl.ao uspoof_build.ao uspoof_conf.ao smpdtfst.ao ztrans.ao
zrule.ao vzone.ao fphdlimp.ao fpositer.ao ufieldpositer.ao decNumber.ao
decContext.ao alphaindex.ao tznames.ao tznames_impl.ao tzgnames.ao tzfmt.ao
compactdecimalformat.ao gender.ao region.ao scriptset.ao uregion.ao
reldatefmt.ao quantityformatter.ao measunit.ao measunit_extra.ao
sharedbreakiterator.ao scientificnumberformatter.ao dayperiodrules.ao nounit.ao
number_affixutils.ao number_compact.ao number_decimalquantity.ao
number_decimfmtprops.ao number_fluent.ao number_formatimpl.ao
number_grouping.ao number_integerwidth.ao number_longnames.ao
number_modifiers.ao number_notation.ao number_output.ao number_padding.ao
number_patternmodifier.ao number_patternstring.ao number_rounding.ao
number_scientific.ao number_utils.ao number_asformat.ao number_mapper.ao
number_multiplier.ao number_currencysymbols.ao number_skeletons.ao
number_capi.ao double-conversion-string-to-double.ao
double-conversion-double-to-string.ao double-conversion-bignum-dtoa.ao
double-conversion-bignum.ao double-conversion-cached-powers.ao
double-conversion-fast-dtoa.ao double-conversion-strtod.ao string_segment.ao
numparse_parsednumber.ao numparse_impl.ao numparse_symbols.ao
numparse_decimal.ao numparse_scientific.ao numparse_currency.ao
numparse_affixes.ao numparse_compositions.ao numparse_validators.ao
numrange_fluent.ao numrange_impl.ao erarules.ao formattedvalue.ao
formattedval_iterimpl.ao formattedval_sbimpl.ao formatted_string_builder.ao
/opt/local/bin/ranlib: file: ../lib/libicui18n.a(wintzimpl.ao) has no symbols
/opt/local/bin/ranlib: file: ../lib/libicui18n.a(windtfmt.ao) has no symbols
/opt/local/bin/ranlib: file: ../lib/libicui18n.a(winnmfmt.ao) has no symbols
ranlib ../lib/libicui18n.a
ranlib: file: ../lib/libicui18n.a(wintzimpl.ao) has no symbols
ranlib: file: ../lib/libicui18n.a(windtfmt.ao) has no symbols
ranlib: file: ../lib/libicui18n.a(winnmfmt.ao) has no symbols
/opt/local/bin/g++-mp-6 -dynamiclib -dynamic -pipe -Os -m32
-D_GLIBCXX_USE_CXX11_ABI=0 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings
-Wno-long-long -std=c++11-fvisibility=hidden
-Wl,-headerpad_max_install_names -Wl,-read_only_relocs,suppress -m32   
-Wl,-compatibility_version -Wl,67 -Wl,-current_version -Wl,67.1 -install_name
/opt/local/lib/libicui18n.67.dylib -o 

[Bug target/104117] gcc10 fails to build icu for ppc64 on 10.5.8 (direct access to a floating-point constant)

2022-01-19 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104117

--- Comment #3 from Sergey Fedorov  ---
(In reply to Iain Sandoe from comment #1)
> most likely present on earlier branches.

Indeed, gcc7.5 likewise failed to build icu for ppc64.

[Bug target/104118] New: gcc11 fails to build R for ppc64 on 10.5.8

2022-01-19 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104118

Bug ID: 104118
   Summary: gcc11 fails to build R for ppc64 on 10.5.8
   Product: gcc
   Version: 11.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
  Host: powerpc-apple-darwin9
Target: powerpc-apple-darwin9
 Build: powerpc-apple-darwin9

Created attachment 52234
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52234=edit
i file for the error

Error where the build fails:

/opt/svacchanda/gcc11/bin/gcc -m64 -O2 -dynamiclib
-Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
-multiply_defined suppress -fopenmp -L /opt/local/lib -L /usr/X11/lib
-install_name libR.dylib -compatibility_version 4.1.0
-current_version 4.1.2  -headerpad_max_install_names -o libR.dylib
CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o altclasses.o altrep.o
apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o
colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o
deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o
envir.o errors.o eval.o format.o
gevents.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o
internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o
match.o memory.o names.o objects.o options.o paste.o patterns.o platform.o
plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o
qsort.o radixsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o
scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o
subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o util.o
version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o `ls
../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/tre/libtre.a
../extra/tzone/libtz.a -L"../../lib" -lRblas -lgfortran -lm -lef_ppc -lintl
-Wl,-framework -Wl,CoreFoundation -lreadline  -L/opt/local/lib -lpcre2-8 -llzma
-lbz2 -lz -licucore -ldl -lm -liconv
ld: absolute addressing (perhaps -mdynamic-no-pic) used in
_walker_ProbSampleReplace from random.o not allowed in slidable image.
Use '-read_only_relocs suppress' to enable text relocs
collect2: error: ld returned 1 exit status
make[3]: *** [libR.dylib] Error 1
make[2]: *** [R] Error 2
make[1]: *** [R] Error 1
make: *** [R] Error 1

Command producing the faulty object:

/opt/svacchanda/gcc11/bin/gcc -m64 -O2 -I../../../src/extra  -I.
-I../../src/include
-I../../../src/include  -I/usr/local/include -I../../../src/nmath
-DHAVE_CONFIG_H   -fopenmp -fPIC  -I /opt/local/include -I /usr/X11/include  -c
../../../src/main/random.c -o random.o

[Bug target/104117] New: gcc10 fails to build icu for ppc64 on 10.5.8 (direct access to a floating-point constant)

2022-01-19 Thread vital.had at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104117

Bug ID: 104117
   Summary: gcc10 fails to build icu for ppc64 on 10.5.8 (direct
access to a floating-point constant)
   Product: gcc
   Version: 10.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vital.had at gmail dot com
CC: iains at gcc dot gnu.org
  Target Milestone: ---
  Host: powerpc-apple-darwin9
Target: powerpc-apple-darwin9
 Build: powerpc-apple-darwin9

Created attachment 52233
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52233=edit
ii file produced for the error

Error where the build fails:

ld: absolute addressing (perhaps -mdynamic-no-pic) used in
__ZN6icu_6712FixedDecimal8decimalsEd from plurrule.o not allowed in slidable
image. Use '-read_only_relocs suppress' to enable text relocs
collect2: error: ld returned 1 exit status
make[1]: *** [../lib/libicui18n.67.1.dylib] Error 1
make: *** [all-recursive] Error 2

Command producing the faulty object:

/opt/iains/powerpc-apple-darwin9/gcc-10-3-ppc/bin/g++ -m64 -O2
-DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -DU_HAVE_STRTOD_L=1
-DU_HAVE_XLOCALE_H=1 -I. -I../common -O2 -W -Wall -pedantic -Wpointer-arith
-Wwrite-strings -Wno-long-long -std=c++11 -fvisibility=hidden -fno-common -c
-dynamic -MMD -MT "plurrule.d plurrule.o plurrule.ao" -o plurrule.o
plurrule.cpp