// Test: violating restrict aliasing rules
// Clause: 6.7.4.2 p21–p24 — if the restrict requirements are not met, behavior is undefined.
#include <stddef.h>

void add(int n, int * restrict p, int * restrict q) {
    for (int i = 0; i < n; ++i) {
        p[i] += q[i];
    }
}

int main(void) {
    int a[4] = {1,2,3,4};
    // UB: passing overlapping objects through restrict-qualified parameters
    add(4, a, a);
    return 0;
}
