kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

call_indirect_arg_fp_field.c (338B)


      1 /* FP-class arg lowered from an OPK_INDIRECT source. */
      2 typedef struct {
      3   double v;
      4   int x;
      5 } Row;
      6 
      7 int sink(double d) { return (int)d; }
      8 
      9 int call_fp(Row* row, int i) { return sink(row[i].v); }
     10 
     11 int test_main(void) {
     12   Row rows[2];
     13   rows[0].v = 42.0;
     14   rows[0].x = 0;
     15   rows[1].v = 99.0;
     16   rows[1].x = 0;
     17   return call_fp(rows, 0);
     18 }