diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2019-10-16 01:47:47 +0200 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2019-10-16 01:47:47 +0200 |
commit | f93701433432f27896183f57b82e9d2b22998c0f (patch) | |
tree | ad862a9f925a8ec66792f00a7c5a2507e216c568 /gcc/genattrtab.c | |
parent | 85093ac6c9f83d1b1206a21dcd0e243eacf69be9 (diff) | |
download | gcc-f93701433432f27896183f57b82e9d2b22998c0f.zip gcc-f93701433432f27896183f57b82e9d2b22998c0f.tar.gz gcc-f93701433432f27896183f57b82e9d2b22998c0f.tar.bz2 |
genattrtab: Parenthesize expressions correctly (PR92107)
As PR92107 shows, genattrtab doesn't parenthesize expressions correctly
(or at all, even). This fixes it.
PR rtl-optimization/92107
* genattrtab.c (write_attr_value) <do_operator>: Parenthesize the
expression written.
From-SVN: r277023
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r-- | gcc/genattrtab.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index cdf0b5c..2fd8593 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -4425,11 +4425,11 @@ write_attr_value (FILE *outf, class attr_desc *attr, rtx value) goto do_operator; do_operator: + fprintf (outf, "("); write_attr_value (outf, attr, XEXP (value, 0)); - fputc (' ', outf); - fputc (op, outf); - fputc (' ', outf); + fprintf (outf, " %c ", op); write_attr_value (outf, attr, XEXP (value, 1)); + fprintf (outf, ")"); break; case IF_THEN_ELSE: |