brintos

brintos / llvm-project-archived public Read only

0
0
Text · 505 B · 93631e7 Raw
10 lines · c
1// RUN: %clang_cc1 -fsyntax-only -Wno-int-conversion -triple x86_64-linux -verify %s2 3// Check that the pointer->int conversion error is not downgradable for the4// pointer argument to __builtin_assume_aligned.5 6int test(int *a, int b) {7  a = (int *)__builtin_assume_aligned(b, 32); // expected-error {{non-pointer argument to '__builtin_assume_aligned' is not allowed}}8  int *y = __builtin_assume_aligned(1, 1); // expected-error {{non-pointer argument to '__builtin_assume_aligned' is not allowed}}9}10