Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
ab9ffbc4
Commit
ab9ffbc4
authored
Aug 11, 2008
by
Andreas Zwinkau
Browse files
two more test cases concering Convs and Divs
[r21089]
parent
06e784ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/test/divs.c
0 → 100644
View file @
ab9ffbc4
int
x
=
42
;
int
y
=
10
;
int
signed_div
(
int
x
,
int
y
)
{
printf
(
"%d (should be 4)
\n
"
,
x
/
y
);
printf
(
"%d (should be 2)
\n
"
,
x
%
y
);
return
(
x
/
y
)
+
(
x
%
y
);
}
unsigned
int
unsigned_div
(
unsigned
int
x
,
unsigned
int
y
)
{
printf
(
"%u (should be 4)
\n
"
,
x
/
y
);
printf
(
"%u (should be 2)
\n
"
,
x
%
y
);
return
(
x
/
y
)
+
(
x
%
y
);
}
double
f_div
(
double
x
,
double
y
)
{
printf
(
"%f (should be 4.2)
\n
"
,
x
/
y
);
return
(
x
/
y
);
}
int
main
(
void
)
{
int
x
=
signed_div
(
42
,
10
)
+
unsigned_div
(
42
,
10
)
+
f_div
(
42
.
0
,
10
.
0
);
return
16
-
x
;
}
ir/be/test/most_complex_conv.c
0 → 100644
View file @
ab9ffbc4
unsigned
int
MAX_INT
=
4294967295
;
int
main
(
void
)
{
double
res
=
MAX_INT
;
printf
(
"Res: %f
\n
"
,
res
);
return
0
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment