This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/54217] New: setup_save_areas() duplicates hard reg uses
- From: "dj at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Aug 2012 00:21:08 +0000
- Subject: [Bug middle-end/54217] New: setup_save_areas() duplicates hard reg uses
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54217
Bug #: 54217
Summary: setup_save_areas() duplicates hard reg uses
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dj@redhat.com
Created attachment 27977
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27977
patch to check for duplicate hard reg uses
setup_save_areas() in caller-save.c sometimes (with -fira-share-save-slots)
maps one hard reg to two different saved regs. Since the save arrays are sized
to [FIRST_PSEUDO_REGISTER] this means the arrays may overflow. The attached
test case demonstrates the error, the attached patch checks for the error and
forces an abort when it's detected. Note: at the time I discovered this,
newlib (from whence the test case came) would show this error "somewhere" for
these *-elf targets: bfin cris m32c rl78 rx sh sh64 v850