Index: gcc/melt-runtime.c =================================================================== --- gcc/melt-runtime.c (revision 175348) +++ gcc/melt-runtime.c (working copy) @@ -6326,7 +6326,7 @@ melt_linemap_compute_current_location (struct read { int colnum = 1; int cix = 0; - if (!rd || !rd->rcurlin) + if (!rd || !rd->rcurlin || !rd->rpfilnam) return; for (cix=0; cixrcol; cix++) { char c = rd->rcurlin[cix]; @@ -6702,13 +6702,22 @@ static melt_ptr_t makesexpr (struct reading_st *rd, int lineno, melt_ptr_t contents_p, location_t loc, bool ismacrostring) { - MELT_ENTERFRAME (4, NULL); + MELT_ENTERFRAME (5, NULL); #define sexprv meltfram__.mcfr_varptr[0] #define contsv meltfram__.mcfr_varptr[1] #define locmixv meltfram__.mcfr_varptr[2] #define sexpclassv meltfram__.mcfr_varptr[3] +#define locnamv meltfram__.mcfr_varptr[4] contsv = contents_p; gcc_assert (melt_magic_discr ((melt_ptr_t) contsv) == MELTOBMAG_LIST); + /* If there is no filename associated, we create a false one, named + "stringBuffer". */ + if(rd->rpfilnam == NULL) + { + locnamv = meltgc_new_string ((meltobject_ptr_t) MELT_PREDEF(DISCR_STRING), + "stringBuffer"); + rd->rpfilnam = (melt_ptr_t *) &locnamv; + } if (loc == 0) locmixv = meltgc_new_mixint ((meltobject_ptr_t) MELT_PREDEF (DISCR_MIXED_INTEGER), *rd->rpfilnam, (long) lineno); @@ -6728,6 +6737,7 @@ makesexpr (struct reading_st *rd, int lineno, melt meltgc_touch (sexprv); MELT_EXITFRAME (); return (melt_ptr_t) sexprv; +#undef locnamv #undef sexprv #undef contsv #undef locmixv @@ -8414,6 +8424,7 @@ meltgc_read_from_val (melt_ptr_t strv_p, melt_ptr_ strv = strv_p; locnamv = locnam_p; rbuf = 0; + seqv = meltgc_new_list ((meltobject_ptr_t) MELT_PREDEF (DISCR_LIST)); strmagic = melt_magic_discr ((melt_ptr_t) strv); switch (strmagic) { @@ -8442,7 +8453,10 @@ meltgc_read_from_val (melt_ptr_t strv_p, melt_ptr_ rds.rlineno = 0; rds.rcurlin = rbuf; rd = &rds; - rds.rpfilnam = (melt_ptr_t *) & locnamv; + if(locnamv == NULL) + rds.rpfilnam = NULL; + else + rds.rpfilnam = (melt_ptr_t *) & locnamv; while (rdcurc ()) { bool got = FALSE;