]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/120188: documented example does not work assignvalue m2plugin
authorGaius Mulley <gaiusmod2@gmail.com>
Mon, 12 May 2025 16:59:00 +0000 (17:59 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Mon, 12 May 2025 16:59:00 +0000 (17:59 +0100)
commit9ce4c801e8275fcf0336ae2fb548f6ebb3ca068b
tree11c1905d5345a453923f3bea65057eb26b300063
parentb5f48e7872db30b8f174cb2c497868a358bf75d6
PR modula2/120188: documented example does not work assignvalue m2plugin

This patch corrects the gm2 command line used in the documentation
to invoke the m2-plugin.  The patch also includes the documentation
example in dejagnu test code with an expect script to check whether
plugins were enabled.

gcc/ChangeLog:

PR modula2/120188
* doc/gm2.texi (Semantic checking): Add -fm2-plugin command line option.

gcc/testsuite/ChangeLog:

PR modula2/120188
* lib/gm2-dg.exp (gm2-dg-frontend-configure-check): New function.
(gm2-dg-runtest): Add -O2 to the option_list.
* gm2.dg/doc/examples/plugin/fail/assignvalue.mod: New test.
* gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp: New test.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/doc/gm2.texi
gcc/testsuite/gm2.dg/doc/examples/plugin/fail/assignvalue.mod [new file with mode: 0644]
gcc/testsuite/gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp [new file with mode: 0644]
gcc/testsuite/lib/gm2-dg.exp