Mercurial > hg > CbC > CbC_gcc
view CbC-examples/parallel_check/c-int-double.c @ 48:9907f3135723
update CbC on GCC from 4.4.2 to 4.4.3.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 07 Feb 2010 17:48:31 +0900 |
parents | 9e4f9e20b8f1 |
children |
line wrap: on
line source
#include<stdio.h> #include<math.h> #define dprint(f, args...) \ printf("in %s env=%p: "f, __FUNCTION__, __builtin_frame_address(1), ## args) int test(int a) { return (int)pow(a, 2.0); } int callee(double a, double b, double c, int d) { dprint("a=%d,b=%d,c=%d,d=%d\n", a,b,c,d); return a+b+c+d; } int caller(int a, double b, double c, double d) { int x; double y,z,w; //x = test(a); //y = test(b); //z = test(c); //w = test(d); x=a, y=b; z=c, w=d; return callee(y,z,w,x); //return callee(b,c,d, a); } int main (int argc, char **argv) { int r; r = caller(11,22,33,44); //r = caller(11,22,33,44, 55,66,77,88); printf("r = %d\n", r); }