Polly
20.0.0git
llvm-project
polly
lib
External
isl
imath
tests
bug-swap.c
Go to the documentation of this file.
1
/* Regression test for mp_int_swap() bug on self-stored values. */
2
#include <stdio.h>
3
#include "imath.h"
4
5
int
main
(
int
argc,
char
* argv[]) {
6
mpz_t
a
,
b
;
7
int
result
;
8
9
mp_int_init_value
(&
a
, 1);
10
mp_int_init_value
(&
b
, 16);
11
12
mp_int_swap
(&
a
, &
b
);
13
result
= (
a
.digits == &(
a
.single) &&
b
.digits == &(
b
.single) &&
14
a
.digits[0] == 16 &&
b
.digits[0] == 1);
15
16
printf(
"REGRESSION: mp_int_swap() on self-stored values: %s\n"
,
17
result
?
"OK"
:
"FAILED"
);
18
19
mp_int_clear
(&
b
);
20
mp_int_clear
(&
a
);
21
return
!
result
;
22
}
result
polly print import Polly Print Scop import result
Definition:
JSONExporter.cpp:881
main
int main()
Definition:
isl_test_cpp-checked-conversion.cc:88
a
a(0)
b
b(9)
mpz_t
Definition:
imath/imath.h:58
mp_int_clear
#define mp_int_clear
Definition:
wrap.h:72
mp_int_swap
#define mp_int_swap
Definition:
wrap.h:119
mp_int_init_value
#define mp_int_init_value
Definition:
wrap.h:98
Generated on Wed Nov 13 2024 03:17:15 for Polly by
1.9.6