Alex Rønne Petersen a0e6d41331
test: remove complex arithmetic testing from c_compiler standalone test
This has no business being here. Tests for our compiler-rt routines should be in
compiler-rt, and tests for our C ABI compliance should be in `test-c-abi`.
2025-11-19 01:42:45 +01:00

30 lines
463 B
C

#include <assert.h>
#include <complex.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int val;
} STest;
int getVal(STest* data) { return data->val; }
int main (int argc, char *argv[])
{
STest* data = (STest*)malloc(sizeof(STest));
data->val = 123;
assert(getVal(data) != 456);
int ok = (getVal(data) == 123);
if (argc > 1) {
fprintf(stdout, "val=%d\n", data->val);
}
free(data);
if (!ok) abort();
return EXIT_SUCCESS;
}