PR 22737
* config/tc-rx.c (rx_start_line): Handle escaped double-quote character.
* testsuite/gas/rx/pr22737.s: New test.
* testsuite/gas/rx/pr22737.d: Likewise.
* testsuite/gas/rx/rx.exp: Run the new test.
+2018-01-22 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR 22737
+ * config/tc-rx.c (rx_start_line): Handle escaped double-quote character.
+ * testsuite/gas/rx/pr22737.s: New test.
+ * testsuite/gas/rx/pr22737.d: Likewise.
+ * testsuite/gas/rx/rx.exp: Run the new test.
+
2018-01-19 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/tc-arm.c (ToC macro): Remove spurious comment.
int in_single_quote = 0;
int done = 0;
char * p = input_line_pointer;
+ char prev_char = 0;
/* Scan the line looking for question marks. Skip past quote enclosed regions. */
do
break;
case '"':
- in_double_quote = ! in_double_quote;
+ /* Handle escaped double quote \" inside a string. */
+ if (prev_char != '\\')
+ in_double_quote = ! in_double_quote;
break;
case '\'':
break;
}
- p ++;
+ prev_char = *p++;
}
while (! done);
}
--- /dev/null
+#objdump: -dr
+
+dump.o: file format elf32-rx-le
+
+
+Disassembly of section .*:
+
+00000000 <.*>:
+ 0: ff 16.*
+ 2: c8 1f 68 22.*
+ 6: d0 64.*
+ 8: a0 3f.*
+ a: 3a e1 4f.*
+ d: da 0e 8c b6 c6 9c.*
+.*
--- /dev/null
+.ascii "\377\026\310\037h\"\320d\240?:\341O\332\016\214\266\306\234."
run_dump_test "rx-asm-good"
# run_list_test "rx-asm-bad" "" "Generation of error messages with bogus Renesas assembler directives"
run_dump_test "pr19665"
+run_dump_test "pr22737"