This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Call reg_scan after if_convert
- From: "Hartmut Penner" <HPENNER at de dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Oct 2002 14:33:33 +0100
- Subject: [PATCH] Call reg_scan after if_convert
Hello,
on s390x got a segmentation fault in init_alias_analysis, when
compiling
2000314-1.c with -O1. Looks like if_convert generates new register, and
there
is no reg_scan call between if_convert and life_analysis in toplev, if
compiling with -O1.
Fix is to call reg_scan after if_convert call.
Bootstrapped/regtest on s390x-ibm-linux
Ok to commit?
Changelog:
* toplev.c (rest_of_compilation): Call reg_rescan after if_convert.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.685
diff -c -p -r1.685 toplev.c
*** toplev.c 27 Oct 2002 09:14:03 -0000 1.685
--- toplev.c 29 Oct 2002 09:51:25 -0000
*************** rest_of_compilation (decl)
*** 3007,3012 ****
--- 3007,3014 ----
cleanup_cfg (CLEANUP_EXPENSIVE);
reg_scan (insns, max_reg_num (), 0);
if_convert (0);
+ /* New registers have been created. Rescan their usage. */
+ reg_scan (insns, max_reg_num (), 0);
close_dump_file (DFI_ce1, print_rtl_with_bb, get_insns ());
timevar_pop (TV_IFCVT);
}
Mit freundlichem Gruß / Best regards,
Hartmut Penner