public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27385]  New: [4.1/4.2 regression] ICE with invalid array initializer
@ 2006-05-02 12:07 reichelt at gcc dot gnu dot org
  2006-05-02 15:26 ` [Bug c++/27385] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-02 12:07 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet causes an ICE since GCC 4.1.0
(and in GCC 3.3, 3.3.1, 3.3.2):

========================
struct A {};

A a[] = { 0 };
========================

The compiler loops forever until it runs out of memory:
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
bug.cc:3: error: initializer for 'A' must be brace-enclosed
[etc.]


-- 
           Summary: [4.1/4.2 regression] ICE with invalid array initializer
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/27385] [4.1/4.2 regression] ICE with invalid array initializer
  2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
@ 2006-05-02 15:26 ` pinskia at gcc dot gnu dot org
  2006-05-14 22:33 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-02 15:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-05-02 15:26 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-02 15:26:17
               date|                            |
   Target Milestone|---                         |4.1.1


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


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

* [Bug c++/27385] [4.1/4.2 regression] ICE with invalid array initializer
  2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
  2006-05-02 15:26 ` [Bug c++/27385] " pinskia at gcc dot gnu dot org
@ 2006-05-14 22:33 ` mmitchel at gcc dot gnu dot org
  2006-05-25  2:40 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-14 22:33 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/27385] [4.1/4.2 regression] ICE with invalid array initializer
  2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
  2006-05-02 15:26 ` [Bug c++/27385] " pinskia at gcc dot gnu dot org
  2006-05-14 22:33 ` mmitchel at gcc dot gnu dot org
@ 2006-05-25  2:40 ` mmitchel at gcc dot gnu dot org
  2006-05-31  4:17 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25  2:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mmitchel at gcc dot gnu dot org  2006-05-25 02:34 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.1                       |4.1.2


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


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

* [Bug c++/27385] [4.1/4.2 regression] ICE with invalid array initializer
  2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-05-25  2:40 ` mmitchel at gcc dot gnu dot org
@ 2006-05-31  4:17 ` mmitchel at gcc dot gnu dot org
  2006-05-31 20:03 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-31  4:17 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

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


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

* [Bug c++/27385] [4.1/4.2 regression] ICE with invalid array initializer
  2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-05-31  4:17 ` mmitchel at gcc dot gnu dot org
@ 2006-05-31 20:03 ` mmitchel at gcc dot gnu dot org
  2006-05-31 20:04 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-31 20:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mmitchel at gcc dot gnu dot org  2006-05-31 20:03 -------
Subject: Bug 27385

Author: mmitchel
Date: Wed May 31 20:03:12 2006
New Revision: 114278

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114278
Log:
        PR c++/27801
        * call.c (perform_implicit_conversion): Do not actually perform
        conversions in templates.
        PR c++/26496
        * call.c (resolve_args): Check for invalid uses of bound
        non-static member functions.
        * init.c (build_offset_ref): Return error_mark_node for errors.
        PR c++/27385
        * decl.c (reshape_init): Robustify.
        (reshape_init_array_1): Likewise.
        PR c++/27801
        * g++.dg/template/cond6.C: New test.
        PR c++/26496
        * g++.dg/template/crash51.C: New test.
        * g++.old-deja/g++.mike/net36.C: Tweak error markers.
        PR c++/27385
        * g++.dg/init/array20.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/init/array20.C
    trunk/gcc/testsuite/g++.dg/template/cond6.C
    trunk/gcc/testsuite/g++.dg/template/crash51.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.old-deja/g++.mike/net36.C


-- 


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


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

* [Bug c++/27385] [4.1/4.2 regression] ICE with invalid array initializer
  2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-05-31 20:03 ` mmitchel at gcc dot gnu dot org
@ 2006-05-31 20:04 ` mmitchel at gcc dot gnu dot org
  2006-05-31 20:12 ` mmitchel at gcc dot gnu dot org
  2006-05-31 20:12 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-31 20:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2006-05-31 20:03 -------
Subject: Bug 27385

Author: mmitchel
Date: Wed May 31 20:03:27 2006
New Revision: 114279

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114279
Log:
        PR c++/27801
        * call.c (perform_implicit_conversion): Do not actually perform
        conversions in templates.
        PR c++/26496
        * call.c (resolve_args): Check for invalid uses of bound
        non-static member functions.
        * init.c (build_offset_ref): Return error_mark_node for errors.
        PR c++/27385
        * decl.c (reshape_init): Robustify.
        (reshape_init_array_1): Likewise.
        PR c++/27801
        * g++.dg/template/cond6.C: New test.
        PR c++/26496
        * g++.dg/template/crash51.C: New test.
        * g++.old-deja/g++.mike/net36.C: Tweak error markers.
        PR c++/27385
        * g++.dg/init/array20.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/init/array20.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/cond6.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/crash51.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/call.c
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/cp/init.c
    branches/gcc-4_1-branch/gcc/testsuite/g++.old-deja/g++.mike/net36.C


-- 


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


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

* [Bug c++/27385] [4.1/4.2 regression] ICE with invalid array initializer
  2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-05-31 20:12 ` mmitchel at gcc dot gnu dot org
@ 2006-05-31 20:12 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-31 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2006-05-31 20:08 -------
Subject: Bug 27385

Author: mmitchel
Date: Wed May 31 20:07:35 2006
New Revision: 114280

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114280
Log:
        PR c++/27801
        * call.c (perform_implicit_conversion): Do not actually perform
        conversions in templates.
        PR c++/26496
        * call.c (resolve_args): Check for invalid uses of bound
        non-static member functions.
        * init.c (build_offset_ref): Return error_mark_node for errors.
        PR c++/27385
        * decl.c (reshape_init): Robustify.
        (reshape_init_array_1): Likewise.
        PR c++/27801
        * g++.dg/template/cond6.C: New test.
        PR c++/26496
        * g++.dg/template/crash51.C: New test.
        * g++.old-deja/g++.mike/net36.C: Tweak error markers.
        PR c++/27385
        * g++.dg/init/array20.C: New test.

Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/27385] [4.1/4.2 regression] ICE with invalid array initializer
  2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-05-31 20:04 ` mmitchel at gcc dot gnu dot org
@ 2006-05-31 20:12 ` mmitchel at gcc dot gnu dot org
  2006-05-31 20:12 ` mmitchel at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-31 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2006-05-31 20:12 -------
Fixed in 4.1.2, 4.2.0.


-- 

mmitchel at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-05-31 20:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-02 12:07 [Bug c++/27385] New: [4.1/4.2 regression] ICE with invalid array initializer reichelt at gcc dot gnu dot org
2006-05-02 15:26 ` [Bug c++/27385] " pinskia at gcc dot gnu dot org
2006-05-14 22:33 ` mmitchel at gcc dot gnu dot org
2006-05-25  2:40 ` mmitchel at gcc dot gnu dot org
2006-05-31  4:17 ` mmitchel at gcc dot gnu dot org
2006-05-31 20:03 ` mmitchel at gcc dot gnu dot org
2006-05-31 20:04 ` mmitchel at gcc dot gnu dot org
2006-05-31 20:12 ` mmitchel at gcc dot gnu dot org
2006-05-31 20:12 ` mmitchel 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).