https://bugs.llvm.org/show_bug.cgi?id=32302

            Bug ID: 32302
           Summary: Template parameter type deduction of function
                    conflicts when parameter is a vector return value of
                    builtin function
           Product: clang
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: westion...@gmail.com
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

cat a.C

template <class A>
A f(const A& a, const A& b){
return a+b;
}

int main(){
vector int a;
vector float b;
f(__builtin_altivec_vcfsx(a,0),b);
}


clang++ a.C -faltivec
a.C:9:1: error: no matching function for call to 'f'
f(__builtin_altivec_vcfsx(a,0),b);
^
a.C:2:3: note: candidate template ignored: deduced conflicting types for
parameter 'A' ('__attribute__((__vector_size__(4 * sizeof(float)))) float'
      (vector of 4 'float' values) vs. '__vector float' (vector of 4 'float'
values))
A f(const A& a, const A& b){
  ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to