public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char
@ 2003-06-16 10:37 etienne.lorrain@masroudeau.com
  2003-06-16 14:13 ` [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator bangerth@dealii.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: etienne.lorrain@masroudeau.com @ 2003-06-16 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE: negative index in array initialisation when no -
                    funsigned-char
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: etienne.lorrain@masroudeau.com
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: i386 Linux
  GCC host triplet: i386 Linux
GCC target triplet: i386 Linux

etienne@fulbert:~/projet/gujin$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,f77,objc,ada --
prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-
include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-
nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --
enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.3 (Debian)
etienne@fulbert:~/projet/gujin$ cat f.c
#define _ 0
#define X 1
#define B(p0, p1, p2, p3, p4, p5, p6, p7) \
        {{p7, p6, p5, p4, p3, p2, p1, p0}}

union font_line_u {
      struct {
        unsigned char b0 :1, b1 :1, b2 :1, b3 :1, b4 :1, b5 :1, b6 :1, b7 :1;
        } __attribute__ ((packed)) bit;
      unsigned char group;
      } __attribute__ ((packed));

const union font_line_u font8x8[256][8] = {
      ['e'] = {
        B (_,_,_,_,_,_,_,_),
        B (_,_,_,_,_,_,_,_),
        B (_,_,_,X,_,_,_,_),
        B (_,_,X,_,X,_,_,_),
        B (_,_,X,X,_,_,_,_),
        B (_,_,X,_,_,_,_,_),
        B (_,_,_,X,X,_,_,_),
        B (_,_,_,_,_,_,_,_),
        },
      ['è'] = { /* e grave */
        B (_,_,_,X,_,_,_,_),
        B (_,_,_,_,X,_,_,_),
        B (_,_,_,X,_,X,_,_),
        B (_,_,X,_,X,_,_,_),
        B (_,_,X,X,_,_,_,_),
        B (_,_,X,_,_,_,_,_),
        B (_,_,_,X,X,_,_,_),
        B (_,_,_,_,_,_,_,_),
        },
        };
etienne@fulbert:~/projet/gujin$ gcc -c f.c -funsigned-char
etienne@fulbert:~/projet/gujin$ gcc -c f.c
f.c:24: Internal compiler error in tree_low_cst, at tree.c:3485
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
etienne@fulbert:~/projet/gujin$


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
@ 2003-06-16 14:13 ` bangerth@dealii.org
  2003-06-26 17:33 ` pinskia at physics dot uc dot edu
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth@dealii.org @ 2003-06-16 14:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth@dealii.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |normal
           Priority|P2                          |P1
   Target Milestone|3.4                         |3.3.1


------- Additional Comments From bangerth@dealii.org  2003-06-16 14:13 -------
It's a regression introduced between 3.0 and 3.2. 2.95 gives this
error:

g/x> gcc -c x.c
x.c:24: duplicate array index in initializer
x.c:24: (near initialization for `font8x8')

Maybe this gives a another clue as to what goes wrong.

W.


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
  2003-06-16 14:13 ` [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator bangerth@dealii.org
@ 2003-06-26 17:33 ` pinskia at physics dot uc dot edu
  2003-07-11 23:20 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-26 17:33 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tharbaugh at lnxi dot com


------- Additional Comments From pinskia at physics dot uc dot edu  2003-06-26 17:33 -------
*** Bug 11333 has been marked as a duplicate of this bug. ***


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
  2003-06-16 14:13 ` [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator bangerth@dealii.org
  2003-06-26 17:33 ` pinskia at physics dot uc dot edu
@ 2003-07-11 23:20 ` mmitchel at gcc dot gnu dot org
  2003-07-23 19:49 ` pinskia at physics dot uc dot edu
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-07-11 23:20 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.1                       |3.3.2


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-07-11 23:20 -------
Postponed until GCC 3.3.2.


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
                   ` (2 preceding siblings ...)
  2003-07-11 23:20 ` mmitchel at gcc dot gnu dot org
@ 2003-07-23 19:49 ` pinskia at physics dot uc dot edu
  2003-07-24 21:12 ` janis187 at us dot ibm dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-23 19:49 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-23 19:49 -------
>From Phil's regression hunter:
: Search converges between 2002-04-21-trunk (#74) and 2002-04-28-trunk (#75).


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
                   ` (3 preceding siblings ...)
  2003-07-23 19:49 ` pinskia at physics dot uc dot edu
@ 2003-07-24 21:12 ` janis187 at us dot ibm dot com
  2003-08-10 15:28 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: janis187 at us dot ibm dot com @ 2003-07-24 21:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


janis187 at us dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at redhat dot com


------- Additional Comments From janis187 at us dot ibm dot com  2003-07-24 21:12 -------
The regression in PR 11207 was introduced or exposed by this patch:

--- gcc/gcc/ChangeLog ---

2002-04-26  Alexandre Oliva  <aoliva@redhat.com>

        * tree.c (tree_int_cst_lt): Compare constants whose types differ
        in unsigned-ness correctly.

The regression hunt used the small test case from comment #1 on
i686-pc-linux-gnu.  Before this patch, compiling that test case gets:

11207.c:1: array index in initializer exceeds array bounds
11207.c:1: (near initialization for `font8x8')


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
                   ` (4 preceding siblings ...)
  2003-07-24 21:12 ` janis187 at us dot ibm dot com
@ 2003-08-10 15:28 ` pinskia at gcc dot gnu dot org
  2003-08-15  2:02 ` mark at codesourcery dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-10 15:28 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-10 15:28 -------
A patch was submitted for this: <http://gcc.gnu.org/ml/gcc-patches/2003-08/
msg00606.html>.


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
                   ` (5 preceding siblings ...)
  2003-08-10 15:28 ` pinskia at gcc dot gnu dot org
@ 2003-08-15  2:02 ` mark at codesourcery dot com
  2003-08-19  1:36 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mark at codesourcery dot com @ 2003-08-15  2:02 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From mark at codesourcery dot com  2003-08-15 02:02 -------
Subject: Re:  [3.3/3.4 regression] ICE with negative index in
	array element designator

On Sun, 2003-08-10 at 08:28, pinskia at gcc dot gnu dot org wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11207
> 
> 
> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-10 15:28 -------
> A patch was submitted for this: <http://gcc.gnu.org/ml/gcc-patches/2003-08/
> msg00606.html>.

That patch is OK for 3.3 and mainline.  Please install!


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
                   ` (6 preceding siblings ...)
  2003-08-15  2:02 ` mark at codesourcery dot com
@ 2003-08-19  1:36 ` cvs-commit at gcc dot gnu dot org
  2003-08-19  1:42 ` cvs-commit at gcc dot gnu dot org
  2003-08-19  4:52 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-19  1:36 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-08-19 01:36 -------
Subject: Bug 11207

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	kraai@gcc.gnu.org	2003-08-19 01:36:29

Modified files:
	gcc            : ChangeLog c-typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/noncompile: 20030818-1.c 

Log message:
	PR c/11207
	* c-typeck.c (set_init_index): Check for negative index.
	
	(testsuite/)
	* gcc.dg/noncompile/20030818-1.c: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.798&r2=2.799
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.252&r2=1.253
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2975&r2=1.2976
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/noncompile/20030818-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
                   ` (7 preceding siblings ...)
  2003-08-19  1:36 ` cvs-commit at gcc dot gnu dot org
@ 2003-08-19  1:42 ` cvs-commit at gcc dot gnu dot org
  2003-08-19  4:52 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-19  1:42 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-08-19 01:42 -------
Subject: Bug 11207

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	kraai@gcc.gnu.org	2003-08-19 01:42:37

Modified files:
	gcc            : ChangeLog c-typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/noncompile: 20030818-1.c 

Log message:
	PR c/11207
	* c-typeck.c (set_init_index): Check for negative index.
	
	(testsuite/)
	
	* gcc.dg/noncompile/20030818-1.c: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.708&r2=1.16114.2.709
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.213.2.7&r2=1.213.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.250&r2=1.2261.2.251
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/noncompile/20030818-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1


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

* [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator
  2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
                   ` (8 preceding siblings ...)
  2003-08-19  1:42 ` cvs-commit at gcc dot gnu dot org
@ 2003-08-19  4:52 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-19  4:52 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

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


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-19 04:52 -------
Fixed by the patch above for 3.3.2 and 3.4.


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

end of thread, other threads:[~2003-08-19  4:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-16 10:37 [Bug c/11207] New: ICE: negative index in array initialisation when no -funsigned-char etienne.lorrain@masroudeau.com
2003-06-16 14:13 ` [Bug c/11207] [3.3/3.4 regression] ICE with negative index in array element designator bangerth@dealii.org
2003-06-26 17:33 ` pinskia at physics dot uc dot edu
2003-07-11 23:20 ` mmitchel at gcc dot gnu dot org
2003-07-23 19:49 ` pinskia at physics dot uc dot edu
2003-07-24 21:12 ` janis187 at us dot ibm dot com
2003-08-10 15:28 ` pinskia at gcc dot gnu dot org
2003-08-15  2:02 ` mark at codesourcery dot com
2003-08-19  1:36 ` cvs-commit at gcc dot gnu dot org
2003-08-19  1:42 ` cvs-commit at gcc dot gnu dot org
2003-08-19  4:52 ` 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).