public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jbglaw at lug-owl dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/39809]  New: emit-rtl.c:608(-> gen_rtx_REG): warning: array subscript is above array bounds
Date: Sat, 18 Apr 2009 20:51:00 -0000	[thread overview]
Message-ID: <bug-39809-5476@http.gcc.gnu.org/bugzilla/> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2287 bytes --]

While mass-building cross-compilers, I got this warning:

$ ./configure --target v850e-linux --prefix
/home/jbglaw/devel/build-temp-v850e-linux/usr --enable-languages=c,c++
--disable-libc --disable-libmudflap --disable-libssp --disable-multilib
--disable-shared --enable-static --with-system-zlib --enable-threads
$ make all-gcc
gcc -c  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition
-Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I.
-I. -I/home/jbglaw/devel/sources/gcc/gcc -I/home/jbglaw/devel/sources/gcc/gcc/.
-I/home/jbglaw/devel/sources/gcc/gcc/../include
-I/home/jbglaw/devel/sources/gcc/gcc/../libcpp/include 
-I/home/jbglaw/devel/sources/gcc/gcc/../libdecnumber
-I/home/jbglaw/devel/sources/gcc/gcc/../libdecnumber/dpd -I../libdecnumber   
/home/jbglaw/devel/sources/gcc/gcc/emit-rtl.c -o emit-rtl.o
/home/jbglaw/devel/sources/gcc/gcc/emit-rtl.c: In function ‘gen_rtx_REG’:
/home/jbglaw/devel/sources/gcc/gcc/emit-rtl.c:608: warning: array subscript is
above array bounds

emit-rtl.c:
 608       if (regno == (unsigned) PIC_OFFSET_TABLE_REGNUM
 609           && fixed_regs[PIC_OFFSET_TABLE_REGNUM])
 610         return pic_offset_table_rtx;

$ grep PIC_OFFSET_TABLE_REGNUM config/v850/*
$ 

$ grep PIC_OFFSET_TABLE_REGNUM defaults.h 
#ifndef PIC_OFFSET_TABLE_REGNUM
#define PIC_OFFSET_TABLE_REGNUM INVALID_REGNUM

$ grep INVALID_REGNUM rtl.h 
#define INVALID_REGNUM                  (~(unsigned int) 0)

Other targets triggering this warning:
$ zgrep gen_rtx_REG *.log.gz|cut -f 1 -d .
avr-linux
frv-linux
h8300-elf
v850e-linux
vax-linux
xtensa-linux


-- 
           Summary: emit-rtl.c:608(-> gen_rtx_REG): warning: array subscript
                    is above array bounds
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbglaw at lug-owl dot de
 GCC build triplet: i686-linux
  GCC host triplet: i686-linux
GCC target triplet: v850e-linux


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


             reply	other threads:[~2009-04-18 20:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-18 20:51 jbglaw at lug-owl dot de [this message]
2009-04-21 18:03 ` [Bug middle-end/39809] " pinskia at gcc dot gnu dot org
2009-04-21 21:33 ` jbglaw at lug-owl dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-39809-5476@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).