================ @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 %s -fsyntax-only -verify +// expected-no-diagnostics + +// This example uncovered a bug in Sema::BuiltinVectorMath, where we should be +// using ASTContext::hasSameUnqualifiedType(). + +typedef float vec3 __attribute__((ext_vector_type(3))); + +typedef struct { + vec3 b; +} struc; + +vec3 foo(vec3 a,const struc* hi) { + vec3 b = __builtin_elementwise_max((vec3)(0.0f), a); + return __builtin_elementwise_pow(b, hi->b.yyy); +} ---------------- cor3ntin wrote:
Can you move that to test/Sema/builtins-elementwise-math.c, leaving a comment referencing the github issue? https://github.com/llvm/llvm-project/pull/141485 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits