public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/28504]  New: [4.0/4.1/4.2 regression] ICE with variable sized array
@ 2006-07-26 21:08 reichelt at gcc dot gnu dot org
  2006-09-03  6:03 ` [Bug c/28504] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-26 21:08 UTC (permalink / raw)
  To: gcc-bugs

The following testcase triggers an ICE since GCC 4.0.0:

==========================================
void foo(void (*p)(int n, int x[n])) {}
==========================================

bug.c: In function 'foo':
bug.c:1: internal compiler error: in make_decl_rtl, at varasm.c:1005
Please submit a full bug report, [etc.]

I'm not sure whether the code is invalid as an extension or not.

  void bar(int n, int x[n]) {}

is accepted as well as

  void foo(void (*p)(int n, int x[n]));

The C++ frontend rejects it, see also
http://gcc.gnu.org/ml/gcc/2006-07/msg00479.html


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with variable sized array
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-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=28504


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

* [Bug c/28504] [4.0/4.1/4.2 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
@ 2006-09-03  6:03 ` pinskia at gcc dot gnu dot org
  2006-09-07  1:14 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-03  6:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-09-03 06:03 -------
Confirmed, this works just fine with typedefs:
typedef void (*type1)(int n, int x[n]);
void foo(type1 p){}

So we have a problem by looking at some parts of the function declation:
SAVE_EXPR <n>;


-- 

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-09-03 06:03:48
               date|                            |
   Target Milestone|---                         |4.0.4


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


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

* [Bug c/28504] [4.0/4.1/4.2 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
  2006-09-03  6:03 ` [Bug c/28504] " pinskia at gcc dot gnu dot org
@ 2006-09-07  1:14 ` mmitchel at gcc dot gnu dot org
  2006-09-08 18:51 ` jsm28 at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-07  1:14 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=28504


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

* [Bug c/28504] [4.0/4.1/4.2 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
  2006-09-03  6:03 ` [Bug c/28504] " pinskia at gcc dot gnu dot org
  2006-09-07  1:14 ` mmitchel at gcc dot gnu dot org
@ 2006-09-08 18:51 ` jsm28 at gcc dot gnu dot org
  2006-09-08 23:41 ` jsm28 at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-09-08 18:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jsm28 at gcc dot gnu dot org  2006-09-08 18:51 -------
Working on a fix.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jsm28 at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-09-03 06:03:48         |2006-09-08 18:51:07
               date|                            |


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


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

* [Bug c/28504] [4.0/4.1/4.2 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-09-08 18:51 ` jsm28 at gcc dot gnu dot org
@ 2006-09-08 23:41 ` jsm28 at gcc dot gnu dot org
  2006-09-09  1:02 ` [Bug c/28504] [4.0/4.1 " jsm28 at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-09-08 23:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jsm28 at gcc dot gnu dot org  2006-09-08 23:41 -------
Subject: Bug 28504

Author: jsm28
Date: Fri Sep  8 23:41:21 2006
New Revision: 116789

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116789
Log:
        PR c/28504
        * c-tree.h (struct c_arg_info): Add pending_sizes.
        * c-parser.c (c_parser_parms_declarator,
        c_parser_parms_list_declarator): Initialize pending_sizes.
        * c-decl.c (get_parm_info): Initialize pending_sizes.
        (get_parm_info): Set pending_sizes.
        (grokdeclarator): Call put_pending_sizes for parameters for
        function definition only.

testsuite:
        * gcc.dg/vla-10.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vla-10.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-decl.c
    trunk/gcc/c-parser.c
    trunk/gcc/c-tree.h
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/28504] [4.0/4.1 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-09-08 23:41 ` jsm28 at gcc dot gnu dot org
@ 2006-09-09  1:02 ` jsm28 at gcc dot gnu dot org
  2007-02-03 18:07 ` gdr at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-09-09  1:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jsm28 at gcc dot gnu dot org  2006-09-09 01:02 -------
Patch doesn't apply cleanly to 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|jsm28 at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.0/4.1/4.2 regression] ICE|[4.0/4.1 regression] ICE
                   |with variable sized array   |with variable sized array


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


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

* [Bug c/28504] [4.0/4.1 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-09-09  1:02 ` [Bug c/28504] [4.0/4.1 " jsm28 at gcc dot gnu dot org
@ 2007-02-03 18:07 ` gdr at gcc dot gnu dot org
  2007-02-03 20:50 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 18:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from gdr at gcc dot gnu dot org  2007-02-03 18:07 -------
Won't fix in GCC-4.0.x.  Adjusting milestone.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.4                       |4.1.3


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


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

* [Bug c/28504] [4.0/4.1 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-02-03 18:07 ` gdr at gcc dot gnu dot org
@ 2007-02-03 20:50 ` pinskia at gcc dot gnu dot org
  2007-02-14  9:14 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-03 20:50 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug c/28504] [4.0/4.1 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-02-03 20:50 ` pinskia at gcc dot gnu dot org
@ 2007-02-14  9:14 ` mmitchel at gcc dot gnu dot org
  2007-06-28  1:26 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:14 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

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


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


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

* [Bug c/28504] [4.0/4.1 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-02-14  9:14 ` mmitchel at gcc dot gnu dot org
@ 2007-06-28  1:26 ` pinskia at gcc dot gnu dot org
  2007-06-28 18:49 ` pinskia at gcc dot gnu dot org
  2008-07-04 15:45 ` [Bug c/28504] [4.1 " jsm28 at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-28  1:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2007-06-28 01:26 -------
*** Bug 32529 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pa at panix dot com


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


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

* [Bug c/28504] [4.0/4.1 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-06-28  1:26 ` pinskia at gcc dot gnu dot org
@ 2007-06-28 18:49 ` pinskia at gcc dot gnu dot org
  2008-07-04 15:45 ` [Bug c/28504] [4.1 " jsm28 at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-28 18:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2007-06-28 18:49 -------
*** Bug 32529 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug c/28504] [4.1 regression] ICE with variable sized array
  2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-06-28 18:49 ` pinskia at gcc dot gnu dot org
@ 2008-07-04 15:45 ` jsm28 at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 15:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jsm28 at gcc dot gnu dot org  2008-07-04 15:44 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|4.0.4                       |4.0.4 4.1.3
      Known to work|                            |4.2.0
         Resolution|                            |FIXED
   Target Milestone|4.1.3                       |4.2.0


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


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

end of thread, other threads:[~2008-07-04 15:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-26 21:08 [Bug c/28504] New: [4.0/4.1/4.2 regression] ICE with variable sized array reichelt at gcc dot gnu dot org
2006-09-03  6:03 ` [Bug c/28504] " pinskia at gcc dot gnu dot org
2006-09-07  1:14 ` mmitchel at gcc dot gnu dot org
2006-09-08 18:51 ` jsm28 at gcc dot gnu dot org
2006-09-08 23:41 ` jsm28 at gcc dot gnu dot org
2006-09-09  1:02 ` [Bug c/28504] [4.0/4.1 " jsm28 at gcc dot gnu dot org
2007-02-03 18:07 ` gdr at gcc dot gnu dot org
2007-02-03 20:50 ` pinskia at gcc dot gnu dot org
2007-02-14  9:14 ` mmitchel at gcc dot gnu dot org
2007-06-28  1:26 ` pinskia at gcc dot gnu dot org
2007-06-28 18:49 ` pinskia at gcc dot gnu dot org
2008-07-04 15:45 ` [Bug c/28504] [4.1 " jsm28 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).