projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5cad80
)
Opps. Copied in the wrong file for initial commit.
author
Jeff Law
<law@gcc.gnu.org>
Mon, 11 Jan 1999 23:40:03 +0000
(16:40 -0700)
committer
Jeff Law
<law@gcc.gnu.org>
Mon, 11 Jan 1999 23:40:03 +0000
(16:40 -0700)
From-SVN: r24625
gcc/testsuite/gcc.c-torture/execute/990106-2.c
patch
|
blob
|
history
diff --git
a/gcc/testsuite/gcc.c-torture/execute/990106-2.c
b/gcc/testsuite/gcc.c-torture/execute/990106-2.c
index 387d83e236097b1cd805df9f353fe3d5015fab71..b057dfd00c59a6b834db11b3f7dd6963acd2f844 100644
(file)
--- a/
gcc/testsuite/gcc.c-torture/execute/990106-2.c
+++ b/
gcc/testsuite/gcc.c-torture/execute/990106-2.c
@@
-1,5
+1,21
@@
-
foo(char *bufp
)
+
unsigned calc_mp(unsigned mod
)
{
- int x = 80;
- return (*bufp++ = x ? 'a' : 'b');
+ unsigned a,b,c;
+ c=-1;
+ a=c/mod;
+ b=0-a*mod;
+ if (b > mod) { a += 1; b-=mod; }
+ return b;
}
+
+int main(int argc, char *argv[])
+{
+ unsigned x = 1234;
+ unsigned y = calc_mp(x);
+
+ if (y != 680)
+ abort ();
+ exit (0);
+}
+
+