public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/18371] New: array subscript out of range
@ 2004-11-08  8:41 dcb314 at hotmail dot com
  2004-11-08 12:40 ` [Bug target/18371] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2004-11-08  8:41 UTC (permalink / raw)
  To: gcc-bugs

Hello there,

I just tried to compile gcc 343 with the Intel C 8.1 compiler.
The Intel compiler said

../../src/gcc-3.4.3/gcc/config/i386/i386.c(10626): warning #175: subscript out
of range
../../src/gcc-3.4.3/gcc/config/i386/i386.c(10629): warning #175: subscript out
of range

The source code is

	long l[3];

	/* ... */

	+ ((((HOST_WIDE_INT) l[3]) << 31) << 1),
	/* ... */
	parts[1] = immed_double_const (l[2], l[3], DImode);

In fact, l[ 3] does not exist. Suggest code re-work.

-- 
           Summary: array subscript out of range
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] array subscript out of range
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
@ 2004-11-08 12:40 ` pinskia at gcc dot gnu dot org
  2004-12-17  7:30 ` [Bug target/18371] [3.4/4.0 Regression] " ebotcazou at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-08 12:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-08 12:40 -------
Confirmed, if I have time I will apply the obvious patch to fix this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|bootstrap                   |target
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-08 12:40:42
               date|                            |
            Summary|array subscript out of range|array subscript out of range
   Target Milestone|---                         |3.4.4


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4/4.0 Regression] array subscript out of range
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
  2004-11-08 12:40 ` [Bug target/18371] " pinskia at gcc dot gnu dot org
@ 2004-12-17  7:30 ` ebotcazou at gcc dot gnu dot org
  2004-12-17  7:32 ` ebotcazou at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-17  7:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-12-17 07:30 -------
This can't reasonably remain unfixed.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
           Priority|P2                          |P1
            Summary|array subscript out of range|[3.4/4.0 Regression] array
                   |                            |subscript out of range


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4/4.0 Regression] array subscript out of range
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
  2004-11-08 12:40 ` [Bug target/18371] " pinskia at gcc dot gnu dot org
  2004-12-17  7:30 ` [Bug target/18371] [3.4/4.0 Regression] " ebotcazou at gcc dot gnu dot org
@ 2004-12-17  7:32 ` ebotcazou at gcc dot gnu dot org
  2004-12-18  1:29 ` [Bug target/18371] [3.4/4.0 Regression] array subscript out of range in gcc sources steven at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-12-17  7:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-12-17 07:32 -------
Jan, the problem was introduced with this patch:
http://gcc.gnu.org/ml/gcc-cvs/2003-10/msg01212.html

Would you mind fixing as soon as possible?  Thanks in advance.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4/4.0 Regression] array subscript out of range in gcc sources
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2004-12-17  7:32 ` ebotcazou at gcc dot gnu dot org
@ 2004-12-18  1:29 ` steven at gcc dot gnu dot org
  2004-12-20 12:44 ` [Bug target/18371] [3.4 " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-18  1:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-18 01:28 -------
Obvious patch posted here: 
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01328.html 
 
This is not a wrong-code bug.  At worst it will crash the compiler, 
but probably it just works by luck, because of stack alignment. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
           Keywords|wrong-code                  |


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4 Regression] array subscript out of range in gcc sources
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2004-12-18  1:29 ` [Bug target/18371] [3.4/4.0 Regression] array subscript out of range in gcc sources steven at gcc dot gnu dot org
@ 2004-12-20 12:44 ` pinskia at gcc dot gnu dot org
  2004-12-20 15:02 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-20 12:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-20 12:44 -------
Fixed on the mainline:
        * config/i386/i386.c (ix86_split_to_parts): Use an array with
        four elements for decoding a CONST_DOUBLE on 64 bits targets.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.0.0
            Summary|[3.4/4.0 Regression] array  |[3.4 Regression] array
                   |subscript out of range in   |subscript out of range in
                   |gcc sources                 |gcc sources


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4 Regression] array subscript out of range in gcc sources
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2004-12-20 12:44 ` [Bug target/18371] [3.4 " pinskia at gcc dot gnu dot org
@ 2004-12-20 15:02 ` steven at gcc dot gnu dot org
  2005-02-14 15:47 ` dcb314 at hotmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-20 15:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-20 15:02 -------
I'm going to test it for GCC 3.4 too.


-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4 Regression] array subscript out of range in gcc sources
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2004-12-20 15:02 ` steven at gcc dot gnu dot org
@ 2005-02-14 15:47 ` dcb314 at hotmail dot com
  2005-02-28 15:37 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2005-02-14 15:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dcb314 at hotmail dot com  2005-02-14 10:05 -------
This bug is still broken in the snapshot for 3.4
dated 20050211

-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4 Regression] array subscript out of range in gcc sources
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2005-02-14 15:47 ` dcb314 at hotmail dot com
@ 2005-02-28 15:37 ` cvs-commit at gcc dot gnu dot org
  2005-03-16 15:24 ` cvs-commit at gcc dot gnu dot org
  2005-03-16 15:30 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-28 15:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-28 08:39 -------
Subject: Bug 18371

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-rhl-branch
Changes by:	jakub@gcc.gnu.org	2005-02-28 08:38:57

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.c 

Log message:
	PR target/18371
	2004-12-19  Steven Bosscher  <stevenb@suse.de>
	* config/i386/i386.c (ix86_split_to_parts): Use an array with
	four elements for decoding a CONST_DOUBLE on 64 bits targets.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=2.2326.2.399.2.73&r2=2.2326.2.399.2.74
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-rhl-branch&r1=1.635.2.8.2.10&r2=1.635.2.8.2.11



-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4 Regression] array subscript out of range in gcc sources
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2005-02-28 15:37 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-16 15:24 ` cvs-commit at gcc dot gnu dot org
  2005-03-16 15:30 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-16 15:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-16 15:24 -------
Subject: Bug 18371

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	sayle@gcc.gnu.org	2005-03-16 15:23:49

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.c 

Log message:
	PR target/18371
	Backport from mainline
	2004-12-19  Steven Bosscher  <stevenb@suse.de>
	* config/i386/i386.c (ix86_split_to_parts): Use an array with
	four elements for decoding a CONST_DOUBLE on 64 bits targets.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.817&r2=2.2326.2.818
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.635.2.19&r2=1.635.2.20



-- 


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18371] [3.4 Regression] array subscript out of range in gcc sources
  2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
                   ` (8 preceding siblings ...)
  2005-03-16 15:24 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-16 15:30 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-16 15:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-16 15:30 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-03-16 15:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-08  8:41 [Bug bootstrap/18371] New: array subscript out of range dcb314 at hotmail dot com
2004-11-08 12:40 ` [Bug target/18371] " pinskia at gcc dot gnu dot org
2004-12-17  7:30 ` [Bug target/18371] [3.4/4.0 Regression] " ebotcazou at gcc dot gnu dot org
2004-12-17  7:32 ` ebotcazou at gcc dot gnu dot org
2004-12-18  1:29 ` [Bug target/18371] [3.4/4.0 Regression] array subscript out of range in gcc sources steven at gcc dot gnu dot org
2004-12-20 12:44 ` [Bug target/18371] [3.4 " pinskia at gcc dot gnu dot org
2004-12-20 15:02 ` steven at gcc dot gnu dot org
2005-02-14 15:47 ` dcb314 at hotmail dot com
2005-02-28 15:37 ` cvs-commit at gcc dot gnu dot org
2005-03-16 15:24 ` cvs-commit at gcc dot gnu dot org
2005-03-16 15:30 ` pinskia at gcc dot gnu dot org

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).