[Bug modula2/108404] M2RTS_Halt fails with a segv (it should emit a diagnostic and exit).
gaius at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 15 20:48:13 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108404
--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Ah the ARRAY OF CHAR is passed as: struct { char *contents; unsigned int high
}.
(Even if VAR or non VAR). The effect of non VAR is for the callee to take a
copy.
Essentially if RTco calls halt it should:
struct { char *contents, unsigned int high } file_aoc, desc_aoc, func_aoc ;
file_aoc.contents = __FILE__;
file_aoc.high = strlen (file_aoc.contents) -1; /* the last legal indice of the
array. */
/* same for desc_aoc, func_aoc. */
Halt (file_aoc, __LINE__, desc_aoc, func_aoc)
More information about the Gcc-bugs
mailing list