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/52504] New: (unreachable) out of bounds access in thread_prologue_and_epilogue_insns


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52504

             Bug #: 52504
           Summary: (unreachable) out of bounds access in
                    thread_prologue_and_epilogue_insns
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: amylaar@gcc.gnu.org
            Blocks: 44756
              Host: x86_64-unknown-linux-gnu
            Target: rx-elf


gcc -c   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common
 -DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/.
-I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include
-I/opt/cfarm/mpc/include  -I../../../gcc/gcc/../libdecnumber
-I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber   
../../../gcc/gcc/function.c -o function.o
In file included from ../../../gcc/gcc/function.c:48:0:
../../../gcc/gcc/function.c: In function âthread_prologue_and_epilogue_insnsâ:
../../../gcc/gcc/regs.h:322:34: error: array subscript is above array bounds
[-Werror=array-bounds]
cc1: all warnings being treated as errors
make[2]: *** [function.o] Error 1

I see that thread_prologue_and_epilogue_insns has:
      if (pic_offset_table_rtx)
        add_to_hard_reg_set (&set_up_by_prologue.set, Pmode,
                             PIC_OFFSET_TABLE_REGNUM);
Where PIC_OFFSET_TABLE_REGNUM is INVALID_REGNUM, this becomes an out-of-bounds
array access.


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