This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/54217] New: setup_save_areas() duplicates hard reg uses


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]