Public bug reported:

When building android-platform-art with clang 20 the call to 'FillVRegs'
is ambiguous. See the following error message:

runtime/art_method-inl.h:173:3: error: call to 'FillVRegs' is ambiguous
  173 |   FillVRegs<ArgType...>(vregs.data(), args...);
      |   ^~~~~~~~~~~~~~~~~~~~~
runtime/art_method-inl.h:200:24: note: in instantiation of function template 
specialization 'art::detail::MaterializeVRegs<'L', 'L'>' requested here
  200 |   auto vregs = detail::MaterializeVRegs<'L', ArgType...>(receiver, 
args...);
      |                        ^
runtime/art_method-inl.h:229:25: note: in instantiation of function template 
specialization 'art::ArtMethod::InvokeInstance<'L', 'L'>' requested here
  229 |   return target_method->InvokeInstance<ReturnType, ArgType...>(self, 
receiver, args...);
      |                         ^
runtime/class_linker.cc:3241:64: note: in instantiation of function template 
specialization 'art::ArtMethod::InvokeVirtual<'L', 'L'>' requested here
 3241 |             
WellKnownClasses::java_lang_ClassLoader_loadClass->InvokeVirtual<'L', 'L'>(
      |                                                                ^
runtime/art_method-inl.h:155:27: note: candidate function [with ArgType = <'L', 
'L'>]
  155 | inline ALWAYS_INLINE void FillVRegs(uint32_t* vregs ATTRIBUTE_UNUSED,
      |                           ^
runtime/art_method-inl.h:160:27: note: candidate function [with FirstArgType = 
'L', ArgType = <'L'>]
  160 | inline ALWAYS_INLINE void FillVRegs(uint32_t* vregs,
      |

I already have a patch for this: that seems to work:

--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -151,7 +151,7 @@
   return sum;
 }
 
-template <char... ArgType>
+template <char... ArgType, std::enable_if_t<sizeof...(ArgType) == 0, int> = 0>
 inline ALWAYS_INLINE void FillVRegs(uint32_t* vregs ATTRIBUTE_UNUSED,
                                     typename ShortyTraits<ArgType>::Type... 
args ATTRIBUTE_UNUSED)
     REQUIRES_SHARED(Locks::mutator_lock_) {}

** Affects: android-platform-art (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2098147

Title:
  call to 'FillVRegs' is ambiguous

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/android-platform-art/+bug/2098147/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to