[Bug middle-end/93399] [8 Regression] Annotate assembler option failure
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 17 14:24:27 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93399
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:c035257d1f775f44359fe55ceb3d018a68d87114
commit r8-10458-gc035257d1f775f44359fe55ceb3d018a68d87114
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Mar 5 09:12:44 2020 +0100
print-rtl: Fix printing of CONST_STRING in DEBUG_INSNs [PR93399]
The following testcase fails to assemble, as CONST_STRING in the
DEBUG_INSNs
is printed as is, so if it contains \n and/or \r, we are in trouble:
.loc 1 14 3
# DEBUG haystack => [si]
# DEBUG needle => "
"
In the gimple dumps we print those (STRING_CSTs) as
# DEBUG haystack => D#1
# DEBUG needle => "\n"
so this patch uses what we use in tree printing for the CONST_STRINGs too.
2020-03-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/93399
* tree-pretty-print.h (pretty_print_string): Declare.
* tree-pretty-print.c (pretty_print_string): Remove forward
declaration, no longer static. Change nbytes parameter type
from unsigned to size_t.
* print-rtl.c (print_value) <case CONST_STRING>: Use
pretty_print_string and for shrink way too long strings.
* gcc.dg/pr93399.c: New test.
(cherry picked from commit e0d6777cda966b04fc47d544c09839c4fa94343c)
More information about the Gcc-bugs
mailing list