This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[ARC] Fix missing brackets in arc.c
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 16 Nov 2016 10:06:00 +0000
- Subject: [ARC] Fix missing brackets in arc.c
- Authentication-results: sourceware.org; auth=none
The old code still built thanks to the brackets in the definition
of XVECEXP.
Tested on arc-elf and committed as obvious.
Thanks,
Richard
gcc/
* config/arc/arc.c (arc_loop_hazard): Add missing brackets.
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 3bce7ef..98c7298 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -7812,7 +7812,7 @@ arc_loop_hazard (rtx_insn *pred, rtx_insn *succ)
jump = pred;
else if (GET_CODE (PATTERN (pred)) == SEQUENCE
&& JUMP_P (XVECEXP (PATTERN (pred), 0, 0)))
- jump = as_a <rtx_insn *> XVECEXP (PATTERN (pred), 0, 0);
+ jump = as_a <rtx_insn *> (XVECEXP (PATTERN (pred), 0, 0));
else
return false;