appleseedlab / superc

The SuperC Parsing Framework
25 stars 4 forks source link

issue assigning type when accessing struct value #133

Open pattersonz opened 3 years ago

pattersonz commented 3 years ago
typedef struct wdb___
{
  int** stmt;
} wdb_t2;
int wdbi_checksum_range(wdb_t2 * wdb) {

  int * stmt = wdb->stmt[0];
  int   x = stmt[0];

  return 1;
}

the following code creates this error:

shifting RBRACK(])
reducing Subscript with 4 frames
TODO: typecheck Subscript
java.lang.IllegalStateException: trying to take cartesian product of empty multiverse
    at superc.cdesugarer.Multiverse.product(Multiverse.java:322)
    at superc.cdesugarer.CActions.action(CActions.java:5167)
    at superc.core.ForkMergeParser.reduce(ForkMergeParser.java:2479)
    at superc.core.ForkMergeParser.parse(ForkMergeParser.java:840)
    at superc.SugarC.parse(SugarC.java:532)
    at xtc.util.Tool.run(Tool.java:502)
    at superc.SugarC.main(SugarC.java:606)
1 error