Commit f9370143 by Segher Boessenkool Committed by Segher Boessenkool

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
parent 85093ac6
2019-10-15 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/92107
* genattrtab.c (write_attr_value) <do_operator>: Parenthesize the
expression written.
2019-10-15 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c: Update description of fix and continue.
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment