public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42059]  New: [4.4/4.5 Regression] ICE with initializer list for VLA
@ 2009-11-15 21:46 reichelt at gcc dot gnu dot org
  2009-11-15 21:46 ` [Bug c++/42059] " reichelt at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-11-15 21:46 UTC (permalink / raw)
  To: gcc-bugs

The following invalid testcase triggers an ICE since GCC 4.4.1:

==================
void foo(int i)
{
  int a[i];
  a = {};
}
==================

bug.cc: In function 'void foo(int)':
bug.cc:4:8: internal compiler error: tree check: expected integer_cst, have
nop_expr in process_init_constructor_array, at cp/typeck2.c:912
Please submit a full bug report, [etc.]


-- 
           Summary: [4.4/4.5 Regression] ICE with initializer list for VLA
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, 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=42059


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

* [Bug c++/42059] [4.4/4.5 Regression] ICE with initializer list for VLA
  2009-11-15 21:46 [Bug c++/42059] New: [4.4/4.5 Regression] ICE with initializer list for VLA reichelt at gcc dot gnu dot org
@ 2009-11-15 21:46 ` reichelt at gcc dot gnu dot org
  2009-11-16 13:49 ` [Bug c++/42059] [4.4/4.5 Regression] [c++0x] " jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-11-15 21:46 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.3


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


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

* [Bug c++/42059] [4.4/4.5 Regression] [c++0x] ICE with initializer list for VLA
  2009-11-15 21:46 [Bug c++/42059] New: [4.4/4.5 Regression] ICE with initializer list for VLA reichelt at gcc dot gnu dot org
  2009-11-15 21:46 ` [Bug c++/42059] " reichelt at gcc dot gnu dot org
@ 2009-11-16 13:49 ` jakub at gcc dot gnu dot org
  2009-11-17  6:59 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-16 13:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2009-11-16 13:49 -------
Created an attachment (id=19020)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19020&action=view)
gcc45-pr42059.patch

Caused by PR40689.  Here is an untested fix.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


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


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

* [Bug c++/42059] [4.4/4.5 Regression] [c++0x] ICE with initializer list for VLA
  2009-11-15 21:46 [Bug c++/42059] New: [4.4/4.5 Regression] ICE with initializer list for VLA reichelt at gcc dot gnu dot org
  2009-11-15 21:46 ` [Bug c++/42059] " reichelt at gcc dot gnu dot org
  2009-11-16 13:49 ` [Bug c++/42059] [4.4/4.5 Regression] [c++0x] " jakub at gcc dot gnu dot org
@ 2009-11-17  6:59 ` jakub at gcc dot gnu dot org
  2009-11-17  7:22 ` jakub at gcc dot gnu dot org
  2009-11-17  7:40 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-17  6:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2009-11-17 06:59 -------
Subject: Bug 42059

Author: jakub
Date: Tue Nov 17 06:59:13 2009
New Revision: 154237

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154237
Log:
        PR c++/42059
        * typeck.c (cp_build_modify_expr): For initializer list call
        check_array_initializer to make sure lhs isn't a VLA.

        * g++.dg/cpp0x/initlist26.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/initlist26.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/42059] [4.4/4.5 Regression] [c++0x] ICE with initializer list for VLA
  2009-11-15 21:46 [Bug c++/42059] New: [4.4/4.5 Regression] ICE with initializer list for VLA reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-11-17  6:59 ` jakub at gcc dot gnu dot org
@ 2009-11-17  7:22 ` jakub at gcc dot gnu dot org
  2009-11-17  7:40 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-17  7:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-11-17 07:22 -------
Subject: Bug 42059

Author: jakub
Date: Tue Nov 17 07:21:43 2009
New Revision: 154239

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154239
Log:
        PR c++/42059
        * typeck.c (cp_build_modify_expr): For initializer list call
        check_array_initializer to make sure lhs isn't a VLA.

        * g++.dg/cpp0x/initlist26.C: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/initlist26.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/typeck.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/42059] [4.4/4.5 Regression] [c++0x] ICE with initializer list for VLA
  2009-11-15 21:46 [Bug c++/42059] New: [4.4/4.5 Regression] ICE with initializer list for VLA reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-11-17  7:22 ` jakub at gcc dot gnu dot org
@ 2009-11-17  7:40 ` jakub at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-17  7:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2009-11-17 07:39 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-11-17  7:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-15 21:46 [Bug c++/42059] New: [4.4/4.5 Regression] ICE with initializer list for VLA reichelt at gcc dot gnu dot org
2009-11-15 21:46 ` [Bug c++/42059] " reichelt at gcc dot gnu dot org
2009-11-16 13:49 ` [Bug c++/42059] [4.4/4.5 Regression] [c++0x] " jakub at gcc dot gnu dot org
2009-11-17  6:59 ` jakub at gcc dot gnu dot org
2009-11-17  7:22 ` jakub at gcc dot gnu dot org
2009-11-17  7:40 ` jakub 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).