Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940654 - sys-devel/llvm-19.1.1 fails to compile on ppc64le with sys-devel/gcc[ieee-long-double]: error: invalid conversion from ‘_Float128 (*)(_Float128) noexcept’ to ‘long double (*)(long double)’
Summary: sys-devel/llvm-19.1.1 fails to compile on ppc64le with sys-devel/gcc[ieee-lon...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal
Assignee: LLVM support project
URL:
Whiteboard:
Keywords: REGRESSION
Depends on: 940676
Blocks:
  Show dependency tree
 
Reported: 2024-10-02 16:28 UTC by matoro
Modified: 2024-10-16 00:01 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (build.log.gz,50.45 KB, application/gzip)
2024-10-02 16:28 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-10-02 16:28:50 UTC
Created attachment 904689 [details]
build.log and emerge --info

This is reproducible only on little-endian, and is therefore presumably caused by sys-devel/gcc[ieee-long-double], which is little-endian-exclusive and force-enabled since 23.0 profiles.

FAILED: lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o 
/usr/bin/powerpc64le-unknown-linux-gnu-g++ -DHAS_LOGF128 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm_build-.ppc64/lib/Analysis -I/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/lib/Analysis -I/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm_build-.ppc64/include -I/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/include  -DNDEBUG -O2 -pipe -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -std=c++17 -MD -MT lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o -MF lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o.d -o lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ConstantFolding.cpp.o -c /var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/lib/Analysis/ConstantFolding.cpp
/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/lib/Analysis/ConstantFolding.cpp: In function ‘llvm::Constant* {anonymous}::GetConstantFoldFPValue128(llvm::float128, llvm::Type*)’:
/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/lib/Analysis/ConstantFolding.cpp:1749:32: warning: converting to ‘double’ from ‘llvm::float128’ {aka ‘_Float128’} with greater conversion rank
 1749 |     return ConstantFP::get(Ty, V);
      |                                ^
In file included from /var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/include/llvm/Analysis/TargetFolder.h:23,
                 from /var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/lib/Analysis/ConstantFolding.cpp:27:
/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/include/llvm/IR/Constants.h:292:41: note:   initializing argument 2 of ‘static llvm::Constant* llvm::ConstantFP::get(llvm::Type*, double)’
  292 |   static Constant *get(Type *Ty, double V);
      |                                  ~~~~~~~^
/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/lib/Analysis/ConstantFolding.cpp: In function ‘llvm::Constant* {anonymous}::ConstantFoldScalarCall1(llvm::StringRef, llvm::Intrinsic::ID, llvm::Type*, llvm::ArrayRef<llvm::Constant*>, const llvm::TargetLibraryInfo*, const llvm::CallBase*)’:
/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/lib/Analysis/ConstantFolding.cpp:2129:34: error: invalid conversion from ‘_Float128 (*)(_Float128) noexcept’ to ‘long double (*)(long double)’ [-fpermissive]
 2129 |         return ConstantFoldFP128(logf128, Op->getValueAPF(), Ty);
      |                                  ^~~~~~~
      |                                  |
      |                                  _Float128 (*)(_Float128) noexcept
/var/tmp/portage/sys-devel/llvm-19.1.1/work/llvm/lib/Analysis/ConstantFolding.cpp:1787:43: note:   initializing argument 1 of ‘llvm::Constant* {anonymous}::ConstantFoldFP128(long double (*)(long double), const llvm::APFloat&, llvm::Type*)’
 1787 | Constant *ConstantFoldFP128(long double (*NativeFP)(long double),
      |                             ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Comment 2 Justus Ranvier 2024-10-16 00:01:48 UTC
(In reply to Sam James from comment #1)
> https://github.com/llvm/llvm-project/issues/100296

There's a patch for that issue already merged into upstream LLVM: https://github.com/llvm/llvm-project/pull/100993/files