diff options
author | Nick Clifton <nickc@redhat.com> | 2008-03-13 10:51:33 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2008-03-13 10:51:33 +0000 |
commit | 5808f4a685c011dca2ea8046508af6c39b91b8da (patch) | |
tree | 387c784a97d6c2a1eb6ac2e81b1dac1d24699ed3 /gas/testsuite | |
parent | 72de5009312d26000c098d9876e30e631b80fc95 (diff) | |
download | gdb-5808f4a685c011dca2ea8046508af6c39b91b8da.zip gdb-5808f4a685c011dca2ea8046508af6c39b91b8da.tar.gz gdb-5808f4a685c011dca2ea8046508af6c39b91b8da.tar.bz2 |
PR gas/5895
* read.c (s_mexit): Warn if attempting to exit a macro when not
inside a macro definition.
* gas/macros/exit.s: New test case.
* gas/macros/macros.exp: Run the new test, expect it to produce an
error result.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/macros/exit.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/macros/macros.exp | 5 |
3 files changed, 20 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 8ebab2e..951ecb5 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-03-13 Nick Clifton <nickc@redhat.com> + + PR gas/5895 + * gas/macros/exit.s: New test case. + * gas/macros/macros.exp: Run the new test, expect it to produce an + error result. + 2008-03-09 Paul Brook <paul@codesourcery.com> * gas/arm/vfpv3-d16-bad.d: New test. diff --git a/gas/testsuite/gas/macros/exit.s b/gas/testsuite/gas/macros/exit.s new file mode 100644 index 0000000..502cff8 --- /dev/null +++ b/gas/testsuite/gas/macros/exit.s @@ -0,0 +1,8 @@ + +.macro MAC + BAD_OP +.endm + +.exitm + + MAC diff --git a/gas/testsuite/gas/macros/macros.exp b/gas/testsuite/gas/macros/macros.exp index 436923e..f8d5c80 100644 --- a/gas/testsuite/gas/macros/macros.exp +++ b/gas/testsuite/gas/macros/macros.exp @@ -77,3 +77,8 @@ run_list_test redef "" if [string match "" [lindex [gas_run ../all/excl.s "-o /dev/null" ""] 0]] { run_dump_test paren } + +# PR 58925: A .exitm pseudo-op outside of a macro definition +# prevented the assembler from parsing the rest of the file, +# and hence catching an erroroneous instruction. +gas_test_error "exit.s" "" ".exitm outside of a macro" |