https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110126
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Gaius Mulley <ga...@gcc.gnu.org>: https://gcc.gnu.org/g:bf470895905e9152424076d1630a9d2c60de023b commit r14-1718-gbf470895905e9152424076d1630a9d2c60de023b Author: Gaius Mulley <gaiusm...@gmail.com> Date: Mon Jun 12 15:25:39 2023 +0100 PR modula2/110126 variables are reported as unused when referenced by ASM fix This patch fixes the trash list of the asm statement. It introduces a separate build procedure for trashed elements. gcc/m2/ChangeLog: PR modula2/110126 * gm2-compiler/M2Quads.def (BuildAsmElement): Remove trash parameter. (BuildAsmTrash): New procedure. * gm2-compiler/M2Quads.mod (BuildAsmTrash): New procedure. (BuildAsmElement): Remove trash parameter. * gm2-compiler/P3Build.bnf (AsmTrashList): Rewrite. Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>