Created attachment 1386322 [details]
Preprocesed C++ File
Description of problem:
The attached reprocessed c++ file fails to compile on ppc64 and ppc64le, but it does compile successfully on x86_64.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. c++ condition_variable.i
In file included from /root/libcxx/include/__mutex_base:15:0,
/root/libcxx/include/chrono: In function ‘void std::__1::this_thread::sleep_for(const std::__1::chrono::duration<_Rep, _Period>&)’:
/root/libcxx/include/thread:438:65: in constexpr expansion of ‘std::__1::chrono::duration<long double>(std::__1::chrono::duration<long long int, std::__1::ratio<1, 1000000000> >::max(), 0)’
/root/libcxx/include/chrono:563:67: in constexpr expansion of ‘std::__1::chrono::duration_cast<std::__1::chrono::duration<long double>, long long int, std::__1::ratio<1, 1000000000> >(__d)’
/root/libcxx/include/chrono:415:67: in constexpr expansion of ‘std::__1::chrono::__duration_cast<std::__1::chrono::duration<long long int, std::__1::ratio<1, 1000000000> >, std::__1::chrono::duration<long double>, std::__1::ratio<1, 1000000000>, true, false>().std::__1::chrono::__duration_cast<std::__1::chrono::duration<long long int, std::__1::ratio<1, 1000000000> >, std::__1::chrono::duration<long double>, std::__1::ratio<1, 1000000000>, true, false>::operator()(__fd)’
/root/libcxx/include/chrono:376:59: error: ‘(9.223372036854775807e+18 / 1.0e+9)’ is not a constant expression
static_cast<_Ct>(__fd.count()) / static_cast<_Ct>(_Period::den)));
File compiles successfully.
The IBM long double format is too weird and not everything in it is possible to be evaluated at compile time.
So is my best option to modify the source to not use constexpr on ppc?
I also should have mentioned that this compiles fine with clang.
@Jakub - what about (9.223372036854775807e+18 / 1.0e+9) is not possible to evaluate at compile time in IBM long double format? I agree that it's an abomination but the unfortunate reality is there will be systems out there with IBM long-double ABI libraries for decades to come. :(
@Tom: one potential workaround is to use IEEE754 standard long double format, e.g. build with "-mabi=ieeelongdouble", but now you're using a different ABI, which may or may not be what you want. It is probably easier to just avoid using constexpr when building with the GCC+PPC combination.
same problem with gcc-8.1.1-5.fc28.ppc64le
(In reply to Tom Stellard from comment #2)
> So is my best option to modify the source to not use constexpr on ppc?
Bill Schmidt, Ph.D.
GCC Architect for Linux on Power
IBM Linux Technology Center
Also see https://bugs.llvm.org/show_bug.cgi?id=39696 . This issue blocks LLVM from building on GCC112 on the compile farm.
(There may be additional build problems).
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30 Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '27'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 27 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.
This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle.
Changing version to '30.