[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2005-02-24 Thread steven at gcc dot gnu dot org

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2005-02-24 Thread jakub at gcc dot gnu dot org

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2005-02-07 Thread giovannibajo at libero dot it

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-12-29 Thread gdr at integrable-solutions dot net

--- 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 [EMAIL PROTECTED] 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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-12-28 Thread cvs-commit at gcc dot gnu dot org

--- 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: [EMAIL PROTECTED]   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=gcconly_with_tag=gcc-3_4-branchr1=1.3892.2.188r2=1.3892.2.189
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcconly_with_tag=gcc-3_4-branchr1=1.3389.2.337r2=1.3389.2.338
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcconly_with_tag=gcc-3_4-branchr1=1.1174.2.28r2=1.1174.2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/array18.C.diff?cvsroot=gcconly_with_tag=gcc-3_4-branchr1=NONEr2=1.1.2.1



-- 


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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-12-27 Thread pinskia at gcc dot gnu dot org

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-12-27 Thread mmitchel at gcc dot gnu dot org

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-12-27 Thread giovannibajo at libero dot it

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-12-15 Thread pinskia at gcc dot gnu dot org

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-12-10 Thread pinskia at gcc dot gnu dot org

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-11-22 Thread mmitchel at gcc dot gnu dot org

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-11-21 Thread giovannibajo at libero dot it

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-11-20 Thread pinskia at gcc dot gnu dot org

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-11-18 Thread giovannibajo at libero dot it

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-11-17 Thread giovannibajo at libero dot it

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-11-17 Thread mark at codesourcery dot com

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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-11-12 Thread mmitchel at gcc dot gnu dot org


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


[Bug c++/18384] [3.3/3.4/4.0 Regression] ICE on zero-length array with empty initializer...

2004-11-08 Thread pinskia at gcc dot gnu dot org

--- 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  [EMAIL PROTECTED]
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|-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