public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18384] New: ICE on zero-length array with empty initializer...
@ 2004-11-08 21:34 apl at alum dot mit dot edu
  2004-11-08 22:09 ` [Bug c++/18384] " apl at alum dot mit dot edu
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: apl at alum dot mit dot edu @ 2004-11-08 21:34 UTC (permalink / raw)
  To: gcc-bugs

Compilers before 3.4.3 (including 2.95.3, gcc-3.3.x) accept

  const int table[0] = {};

With 3.4.3, we see

[apl]aluminum$ /tools/linux/gcc-3.4.3/bin/g++ -c bug.cxx
bug.cxx:1: internal compiler error: in tree_low_cst, at tree.c:3313
Please submit a full bug report,
with preprocessed source if appropriate.

This also fails on Solaris.....

-- 
           Summary: ICE on zero-length array with empty initializer...
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: apl at alum dot mit dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/18384] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
@ 2004-11-08 22:09 ` apl at alum dot mit dot edu
  2004-11-08 22:12 ` [Bug c++/18384] [3.3/3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: apl at alum dot mit dot edu @ 2004-11-08 22:09 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |3.3.3 3.4.2 2.95.3


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
  2004-11-08 22:09 ` [Bug c++/18384] " apl at alum dot mit dot edu
@ 2004-11-08 22:12 ` pinskia at gcc dot gnu dot org
  2004-11-12 18:20 ` mmitchel at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-08 22:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-08 22:12 -------
: Search converges between 2004-09-21-004002-3.4 (#77) and 2004-09-22-004001-3.4 (#78).
: Search converges between 2004-09-20-161001-trunk (#551) and 2004-09-21-094824-trunk 
(#552).
: Search converges between 2004-09-20-064502-3.3 (#296) and 2004-09-27-064501-3.3 (#297).

Looks like another fall out from
2004-09-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
        PR c++/14179
        * decl.c (reshape_init): Extract array handling into...
        (reshape_init_array): New function. Use integers instead of trees
        for indices. Handle out-of-range designated initializers.

Related to PR 18327 which is the first fall out.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at gcc dot gnu
                   |                            |dot org, gdr at gcc dot gnu
                   |                            |dot org, pinskia at gcc dot
                   |                            |gnu dot org
OtherBugsDependingO|                            |18327
              nThis|                            |
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.0.0 3.4.3
      Known to work|3.3.3 3.4.2 2.95.3          |3.3 3.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-08 22:12:34
               date|                            |
            Summary|ICE on zero-length array    |[3.3/3.4/4.0 Regression] ICE
                   |with empty initializer...   |on zero-length array with
                   |                            |empty initializer...
   Target Milestone|---                         |3.4.4


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
  2004-11-08 22:09 ` [Bug c++/18384] " apl at alum dot mit dot edu
  2004-11-08 22:12 ` [Bug c++/18384] [3.3/3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-11-12 18:20 ` mmitchel at gcc dot gnu dot org
  2004-11-18  1:44 ` giovannibajo at libero dot it
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-12 18:20 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (2 preceding siblings ...)
  2004-11-12 18:20 ` mmitchel at gcc dot gnu dot org
@ 2004-11-18  1:44 ` giovannibajo at libero dot it
  2004-11-18  7:59 ` mark at codesourcery dot com
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2004-11-18  1:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-11-18 01:44 -------
Mark, I guess this is the same problem of PR 18327. Will your fix take care of 
both, or should I look into PR 18327?

-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (3 preceding siblings ...)
  2004-11-18  1:44 ` giovannibajo at libero dot it
@ 2004-11-18  7:59 ` mark at codesourcery dot com
  2004-11-18  9:00 ` giovannibajo at libero dot it
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mark at codesourcery dot com @ 2004-11-18  7:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mark at codesourcery dot com  2004-11-18 07:59 -------
Subject: Re:  [3.3/3.4/4.0 Regression] ICE on zero-length array
 with empty initializer...

giovannibajo at libero dot it wrote:

>------- Additional Comments From giovannibajo at libero dot it  2004-11-18 01:44 -------
>Mark, I guess this is the same problem of PR 18327. Will your fix take care of 
>both, or should I look into PR 18327?
>
I haven't fixed either bug yet, so go for it!



-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (4 preceding siblings ...)
  2004-11-18  7:59 ` mark at codesourcery dot com
@ 2004-11-18  9:00 ` giovannibajo at libero dot it
  2004-11-20 18:33 ` pinskia at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2004-11-18  9:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-11-18 09:00 -------
OK, I'll take care of this since I caused it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mark at codesourcery dot com|giovannibajo at libero dot
                   |                            |it


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (5 preceding siblings ...)
  2004-11-18  9:00 ` giovannibajo at libero dot it
@ 2004-11-20 18:33 ` pinskia at gcc dot gnu dot org
  2004-11-21 22:53 ` giovannibajo at libero dot it
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-20 18:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-20 18:33 -------
*** Bug 18581 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bagnara at cs dot unipr dot
                   |                            |it


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (6 preceding siblings ...)
  2004-11-20 18:33 ` pinskia at gcc dot gnu dot org
@ 2004-11-21 22:53 ` giovannibajo at libero dot it
  2004-11-23  1:17 ` mmitchel at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2004-11-21 22:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-11-21 22:52 -------
It looks like the testcase in this bug (and the related bugs and duplicates) 
is invalid. But I am not sure if it used to be accepted thanks to a GCC 
extension we want to prefer. Can someone elaborate on this?

This affects the kind of fix we want to do, at least on mainline: if we catch 
the error early on, there is no need to add sanity checks in reshape_init, and 
the ICE will disappear. For the branches, of course, I'll prepare a minimum 
fix which will work around the ICE.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org
           Keywords|ice-on-valid-code           |ice-on-invalid-code


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (7 preceding siblings ...)
  2004-11-21 22:53 ` giovannibajo at libero dot it
@ 2004-11-23  1:17 ` mmitchel at gcc dot gnu dot org
  2004-12-10 13:27 ` pinskia at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-23  1:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-23 01:17 -------
I think that the idea behavior here would be to match GNU C.  If we reject this
code in C, then we should certainly do so in C++ as well.  If we accept it in C,
then it would be nice to accept it in C++.

-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (8 preceding siblings ...)
  2004-11-23  1:17 ` mmitchel at gcc dot gnu dot org
@ 2004-12-10 13:27 ` pinskia at gcc dot gnu dot org
  2004-12-15 13:36 ` pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-10 13:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-10 13:27 -------
*** Bug 18922 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |a dot kral at sh dot cvut
                   |                            |dot cz


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (9 preceding siblings ...)
  2004-12-10 13:27 ` pinskia at gcc dot gnu dot org
@ 2004-12-15 13:36 ` pinskia at gcc dot gnu dot org
  2004-12-27 15:47 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-15 13:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-15 13:36 -------
*** Bug 19006 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (10 preceding siblings ...)
  2004-12-15 13:36 ` pinskia at gcc dot gnu dot org
@ 2004-12-27 15:47 ` pinskia at gcc dot gnu dot org
  2004-12-27 17:18 ` mmitchel at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-27 15:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-27 15:47 -------
Jakub posted a patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01962.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com
           Keywords|ice-on-invalid-code         |ice-on-valid-code, patch


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (11 preceding siblings ...)
  2004-12-27 15:47 ` pinskia at gcc dot gnu dot org
@ 2004-12-27 17:18 ` mmitchel at gcc dot gnu dot org
  2004-12-27 21:57 ` giovannibajo at libero dot it
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-27 17:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-12-27 17:18 -------
This patch is OK in pricinple.

However, I don't think the designated_index change (to check for sizetype) is
necessary.  And, I think that the max_index should always be sizetype (and thus
the check is unncessary).

Jakub, would you please retry with a simplified version of your patch?

-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (12 preceding siblings ...)
  2004-12-27 17:18 ` mmitchel at gcc dot gnu dot org
@ 2004-12-27 21:57 ` giovannibajo at libero dot it
  2004-12-28 20:58 ` cvs-commit at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2004-12-27 21:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-12-27 21:57 -------
Jakub, many thanks for cleaning this up for me!!

Just one comment: in your latest patch, the second error message is capitalized 
and shouldn't, plus it uses a double negation ("not a non-negative number") 
which could be probably simplified into "a negative number".

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|giovannibajo at libero dot  |jakub at redhat dot com
                   |it                          |


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (13 preceding siblings ...)
  2004-12-27 21:57 ` giovannibajo at libero dot it
@ 2004-12-28 20:58 ` cvs-commit at gcc dot gnu dot org
  2004-12-29 18:54 ` gdr at integrable-solutions dot net
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-28 20:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-28 20:58 -------
Subject: Bug 18384

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	jakub@gcc.gnu.org	2004-12-28 20:57:56

Modified files:
	gcc/cp         : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/cp         : decl.c 
Added files:
	gcc/testsuite/g++.dg/init: array18.C 

Log message:
	PR c++/18384, c++/18327
	* decl.c (reshape_init_array): Use UHWI type for max_index_cst
	and index.  Convert max_index to size_type_node if it isn't
	host_integerp (, 1).
	
	* g++.dg/init/array18.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.188&r2=1.3892.2.189
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.337&r2=1.3389.2.338
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1174.2.28&r2=1.1174.2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/array18.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (14 preceding siblings ...)
  2004-12-28 20:58 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-29 18:54 ` gdr at integrable-solutions dot net
  2005-02-07 21:12 ` giovannibajo at libero dot it
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-12-29 18:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-12-29 18:54 -------
Subject: Re:  [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

"mark at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> writes:

| > As for designated_index, this differs between 3.3 and 3.4+ it seems.
| > With GCC 3.3, reshape_init_array can see arbitrary trees in TREE_PURPOSE (),
| > checking of these happens afterwards, not before reshape_init.	So I think we
| > certainly want a host_integerp (, 1) there, that will ensure it is an
| > INTEGER_CST and not negative. 

That is OK for 3.3.x

-- Gaby


-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (15 preceding siblings ...)
  2004-12-29 18:54 ` gdr at integrable-solutions dot net
@ 2005-02-07 21:12 ` giovannibajo at libero dot it
  2005-02-25 16:01 ` steven at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: giovannibajo at libero dot it @ 2005-02-07 21:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2005-02-07 10:37 -------
Jakub, it looks like you applied the patch only to 3.4. Can you apply it to 
mainline and 3.3 too so that we can close this regression?

-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (16 preceding siblings ...)
  2005-02-07 21:12 ` giovannibajo at libero dot it
@ 2005-02-25 16:01 ` steven at gcc dot gnu dot org
  2005-02-25 16:20 ` jakub at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-02-25 16:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-02-25 06:39 -------
Jakub, any plans to commit your patch to mainline and 3.3? 

-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (17 preceding siblings ...)
  2005-02-25 16:01 ` steven at gcc dot gnu dot org
@ 2005-02-25 16:20 ` jakub at gcc dot gnu dot org
  2005-02-28 16:23 ` [Bug c++/18384] [3.3/3.4/4.0/4.1 " cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-25 16:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2005-02-25 06:49 -------
The trunk version of the patch works (I have it in my local tree for ages), it
hasn't been applied because of
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01976.html
but as seen in the thread after that there were issues with changing that.

So I think it would be best to apply
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01962.html
(well, the actual patch I have is a tiny bit different) for at least 4.0 branch
and deal with the sign extension of sizetype for 4.1.

As for 3.3, I haven't had yet time to write the patch, so if there are any
volunteers to write/regtest that, it would be appreciated.

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


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


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

* [Bug c++/18384] [3.3/3.4/4.0/4.1 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (18 preceding siblings ...)
  2005-02-25 16:20 ` jakub at gcc dot gnu dot org
@ 2005-02-28 16:23 ` cvs-commit at gcc dot gnu dot org
  2005-03-10 14:19 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-28 16:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-28 12:03 -------
Subject: Bug 18384

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-rhl-branch
Changes by:	jakub@gcc.gnu.org	2005-02-28 12:03:27

Modified files:
	gcc/cp         : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/cp         : decl.c 
Added files:
	gcc/testsuite/g++.dg/init: array18.C 

Log message:
	PR c++/18384, c++/18327
	* decl.c (reshape_init_array): Use UHWI type for max_index_cst
	and index.  Convert max_index to size_type_node if it isn't
	host_integerp (, 1).
	
	* g++.dg/init/array18.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-rhl-branch&r1=1.4648.2.1&r2=1.4648.2.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-rhl-branch&r1=1.5084.2.9.2.2&r2=1.5084.2.9.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-rhl-branch&r1=1.1371.2.1&r2=1.1371.2.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/array18.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-rhl-branch&r1=NONE&r2=1.1.8.1



-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0/4.1 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (19 preceding siblings ...)
  2005-02-28 16:23 ` [Bug c++/18384] [3.3/3.4/4.0/4.1 " cvs-commit at gcc dot gnu dot org
@ 2005-03-10 14:19 ` cvs-commit at gcc dot gnu dot org
  2005-03-10 14:21 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-10 14:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-10 14:18 -------
Subject: Bug 18384

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	jakub@gcc.gnu.org	2005-03-10 14:17:11

Modified files:
	gcc/cp         : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/cp         : decl.c 
Added files:
	gcc/testsuite/g++.dg/init: array19.C 

Log message:
	PR c++/18384, c++/18327
	* decl.c (reshape_init_array): Use UHWI type for max_index_cst
	and index.  Convert max_index to size_type_node if it isn't
	host_integerp (, 1).
	
	* g++.dg/init/array19.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.8&r2=1.4648.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.31&r2=1.5084.2.32
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1371.2.2&r2=1.1371.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/array19.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/18384] [3.3/3.4/4.0/4.1 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (20 preceding siblings ...)
  2005-03-10 14:19 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-10 14:21 ` cvs-commit at gcc dot gnu dot org
  2005-03-10 14:23 ` [Bug c++/18384] [3.3 " jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-10 14:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-10 14:20 -------
Subject: Bug 18384

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2005-03-10 14:19:51

Modified files:
	gcc/cp         : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/cp         : decl.c 
Added files:
	gcc/testsuite/g++.dg/init: array19.C 

Log message:
	PR c++/18384, c++/18327
	* decl.c (reshape_init_array): Use UHWI type for max_index_cst
	and index.  Convert max_index to size_type_node if it isn't
	host_integerp (, 1).
	
	* g++.dg/init/array19.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4658&r2=1.4659
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5136&r2=1.5137
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1376&r2=1.1377
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/array19.C.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug c++/18384] [3.3 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (21 preceding siblings ...)
  2005-03-10 14:21 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-10 14:23 ` jakub at gcc dot gnu dot org
  2005-04-30 13:08 ` gdr at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-03-10 14:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2005-03-10 14:22 -------
Fixed for 3.4/4.0/4.1.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.0.0 3.4.3                 |3.4.3
      Known to work|3.3 3.4.0                   |3.3 3.4.0 3.4.4 4.0.0 4.1.0
            Summary|[3.3/3.4/4.0/4.1 Regression]|[3.3 Regression] ICE on
                   |ICE on zero-length array    |zero-length array with empty
                   |with empty initializer...   |initializer...
   Target Milestone|3.4.4                       |3.3.6


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


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

* [Bug c++/18384] [3.3 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (22 preceding siblings ...)
  2005-03-10 14:23 ` [Bug c++/18384] [3.3 " jakub at gcc dot gnu dot org
@ 2005-04-30 13:08 ` gdr at gcc dot gnu dot org
  2005-04-30 13:26 ` gdr at gcc dot gnu dot org
  2005-05-02 11:13 ` reichelt at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 13:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2005-04-30 13:08 -------
will not fix in 3.3.x

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.6                       |3.4.3


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


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

* [Bug c++/18384] [3.3 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (23 preceding siblings ...)
  2005-04-30 13:08 ` gdr at gcc dot gnu dot org
@ 2005-04-30 13:26 ` gdr at gcc dot gnu dot org
  2005-05-02 11:13 ` reichelt at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 13:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2005-04-30 13:26 -------
 fixed for 3.4.x

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|3.4.3                       |3.3.6


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


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

* [Bug c++/18384] [3.3 Regression] ICE on zero-length array with empty initializer...
  2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
                   ` (24 preceding siblings ...)
  2005-04-30 13:26 ` gdr at gcc dot gnu dot org
@ 2005-05-02 11:13 ` reichelt at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-05-02 11:13 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|3.3 3.4.0 3.4.4 4.0.0 4.1.0 |3.3 3.4.0 3.4.1 3.4.2 3.4.4
                   |                            |4.0.0 4.1.0
   Target Milestone|3.3.6                       |3.4.4


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


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

end of thread, other threads:[~2005-05-02 11:13 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-08 21:34 [Bug c++/18384] New: ICE on zero-length array with empty initializer apl at alum dot mit dot edu
2004-11-08 22:09 ` [Bug c++/18384] " apl at alum dot mit dot edu
2004-11-08 22:12 ` [Bug c++/18384] [3.3/3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-12 18:20 ` mmitchel at gcc dot gnu dot org
2004-11-18  1:44 ` giovannibajo at libero dot it
2004-11-18  7:59 ` mark at codesourcery dot com
2004-11-18  9:00 ` giovannibajo at libero dot it
2004-11-20 18:33 ` pinskia at gcc dot gnu dot org
2004-11-21 22:53 ` giovannibajo at libero dot it
2004-11-23  1:17 ` mmitchel at gcc dot gnu dot org
2004-12-10 13:27 ` pinskia at gcc dot gnu dot org
2004-12-15 13:36 ` pinskia at gcc dot gnu dot org
2004-12-27 15:47 ` pinskia at gcc dot gnu dot org
2004-12-27 17:18 ` mmitchel at gcc dot gnu dot org
2004-12-27 21:57 ` giovannibajo at libero dot it
2004-12-28 20:58 ` cvs-commit at gcc dot gnu dot org
2004-12-29 18:54 ` gdr at integrable-solutions dot net
2005-02-07 21:12 ` giovannibajo at libero dot it
2005-02-25 16:01 ` steven at gcc dot gnu dot org
2005-02-25 16:20 ` jakub at gcc dot gnu dot org
2005-02-28 16:23 ` [Bug c++/18384] [3.3/3.4/4.0/4.1 " cvs-commit at gcc dot gnu dot org
2005-03-10 14:19 ` cvs-commit at gcc dot gnu dot org
2005-03-10 14:21 ` cvs-commit at gcc dot gnu dot org
2005-03-10 14:23 ` [Bug c++/18384] [3.3 " jakub at gcc dot gnu dot org
2005-04-30 13:08 ` gdr at gcc dot gnu dot org
2005-04-30 13:26 ` gdr at gcc dot gnu dot org
2005-05-02 11:13 ` reichelt 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).