This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/43763] segfault when using by -mwarn-cell-microcode
- From: "segher at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Mar 2017 17:01:21 +0000
- Subject: [Bug target/43763] segfault when using by -mwarn-cell-microcode
- Auto-submitted: auto-generated
- References: <bug-43763-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43763
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Author: segher
Date: Fri Mar 3 17:00:50 2017
New Revision: 245880
URL: https://gcc.gnu.org/viewcvs?rev=245880&root=gcc&view=rev
Log:
rs6000: Fix for -mwarn-cell-microcode (PR43763)
If using -mwarn-cell-microcode, rs6000_final_prescan_insn calls
get_insn_template to get the name of the machine instruction. But,
get_insn_template calls the output template if that is code, and that
then can modify recog_data (it is normal to change the operands, for
example).
This patch saves and restores recog_data around the call to
get_insn_template to fix the problems this causes.
PR target/43763
* config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
restore recog_data (including the operand rtxes inside it) around
the call to get_insn_template.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c