public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/13732] New: internal compiler error with structures
@ 2004-01-18 20:51 sylvain at gplservice dot fr
  2004-01-18 20:54 ` [Bug c/13732] " sylvain at gplservice dot fr
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sylvain at gplservice dot fr @ 2004-01-18 20:51 UTC (permalink / raw)
  To: gcc-bugs

I'v got an internal compiler error when compiling this :
// test.c
#include <stdlib.h>
void algo_fourmis(int nombre_points)
{
typedef struct
{
short memoire[nombre_points+1];
char bann_list[nombre_points+1];
} fourmi;

fourmi *creation_fourmi(int nombre_points)
{
int i;
fourmi *f;
f = ( fourmi *) malloc(sizeof(fourmi));
for (i=0;i<=nombre_points;i++)
	f->bann_list[i]=0;
return f;
}
}
// end

I don't realy know if this is valid c code but I have no problems compiling it
with gcc 2.95
but with all version 3.x.x I tried ( 3.0.4, 3.3.0, 3.3.1, ) it fails.

$ gcc -Wall -c g.c
test.c: In function `creation_fourmi':
test.c:15: internal compiler error: in expand_expr, at expr.c:6933
Please submit a full bug report,
with preprocessed source if appropriate.

-- 
           Summary: internal compiler error with structures
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sylvain at gplservice dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c/13732] internal compiler error with structures
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
@ 2004-01-18 20:54 ` sylvain at gplservice dot fr
  2004-01-18 21:00 ` dhazeghi at yahoo dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sylvain at gplservice dot fr @ 2004-01-18 20:54 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|                            |AMD Athlon(tm) Processor


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


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

* [Bug c/13732] internal compiler error with structures
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
  2004-01-18 20:54 ` [Bug c/13732] " sylvain at gplservice dot fr
@ 2004-01-18 21:00 ` dhazeghi at yahoo dot com
  2004-01-18 21:07 ` [Bug c/13732] internal compiler error with structures with VLAs and functions inside functions pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-18 21:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dhazeghi at yahoo dot com  2004-01-18 21:00 -------
Confirmed. Reduced further to:

void
algo_fourmis (int nombre_points)
{
  typedef struct
  {
    char bann_list[nombre_points];
  } fourmi;

  void creation_fourmi (int nombre_points)
  {
    int i = sizeof (fourmi);
  }
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
 GCC target triplet|AMD Athlon(tm) Processor    |
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-18 21:00:33
               date|                            |


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


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

* [Bug c/13732] internal compiler error with structures with VLAs and functions inside functions
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
  2004-01-18 20:54 ` [Bug c/13732] " sylvain at gplservice dot fr
  2004-01-18 21:00 ` dhazeghi at yahoo dot com
@ 2004-01-18 21:07 ` pinskia at gcc dot gnu dot org
  2004-01-18 21:08 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-18 21:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-18 21:07 -------
Note to get this ICEing on the tree-ssa (at -O2 or higher or using -funit-at-a-time) the following 
testcase is needed:
int
algo_fourmis (int nombre_points)
{
  typedef struct
  {
    char bann_list[nombre_points];
  } fourmi;

  int creation_fourmi (int nombre_points)
  {
    return sizeof (fourmi);
  }
  return creation_fourmi(nombre_points);
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|internal compiler error with|internal compiler error with
                   |structures                  |structures with VLAs and
                   |                            |functions inside functions


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


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

* [Bug c/13732] internal compiler error with structures with VLAs and functions inside functions
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
                   ` (2 preceding siblings ...)
  2004-01-18 21:07 ` [Bug c/13732] internal compiler error with structures with VLAs and functions inside functions pinskia at gcc dot gnu dot org
@ 2004-01-18 21:08 ` pinskia at gcc dot gnu dot org
  2004-01-18 22:17 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-18 21:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-18 21:08 -------
Note you are using two GNU extension in here, VLA inside structs and function inside functions.

-- 


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


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

* [Bug c/13732] internal compiler error with structures with VLAs and functions inside functions
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
                   ` (3 preceding siblings ...)
  2004-01-18 21:08 ` pinskia at gcc dot gnu dot org
@ 2004-01-18 22:17 ` pinskia at gcc dot gnu dot org
  2004-01-28  5:58 ` [Bug c/13732] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-18 22:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-18 22:17 -------
Related to bug 9936.

-- 


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


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

* [Bug c/13732] [3.3/3.4/3.5 Regression] internal compiler error with structures with VLAs and functions inside functions
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
                   ` (4 preceding siblings ...)
  2004-01-18 22:17 ` pinskia at gcc dot gnu dot org
@ 2004-01-28  5:58 ` pinskia at gcc dot gnu dot org
  2004-02-15 12:40 ` gdr at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-28  5:58 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
      Known to work|                            |tree-ssa 2.95.3
            Summary|internal compiler error with|[3.3/3.4/3.5 Regression]
                   |structures with VLAs and    |internal compiler error with
                   |functions inside functions  |structures with VLAs and
                   |                            |functions inside functions
   Target Milestone|---                         |3.3.3


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


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

* [Bug c/13732] [3.3/3.4/3.5 Regression] internal compiler error with structures with VLAs and functions inside functions
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
                   ` (5 preceding siblings ...)
  2004-01-28  5:58 ` [Bug c/13732] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-02-15 12:40 ` gdr at gcc dot gnu dot org
  2004-03-01  1:47 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-02-15 12:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-02-15 12:40 -------
Adjust milestone

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.3                       |3.3.4


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


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

* [Bug c/13732] [3.3/3.4/3.5 Regression] internal compiler error with structures with VLAs and functions inside functions
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
                   ` (6 preceding siblings ...)
  2004-02-15 12:40 ` gdr at gcc dot gnu dot org
@ 2004-03-01  1:47 ` mmitchel at gcc dot gnu dot org
  2004-03-08 15:53 ` pinskia at gcc dot gnu dot org
  2004-05-13 23:36 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01  1:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 01:47 -------
Problems with nested functions are not showstoppers, and this will be fixed in
GCC 3.5.0, so I have moved the target milestones to 3.5.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.4                       |3.5.0


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


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

* [Bug c/13732] [3.3/3.4/3.5 Regression] internal compiler error with structures with VLAs and functions inside functions
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
                   ` (7 preceding siblings ...)
  2004-03-01  1:47 ` mmitchel at gcc dot gnu dot org
@ 2004-03-08 15:53 ` pinskia at gcc dot gnu dot org
  2004-05-13 23:36 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-08 15:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-08 15:53 -------
Suspending as this is fixed on the tree-ssa.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


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


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

* [Bug c/13732] [3.3/3.4/3.5 Regression] internal compiler error with structures with VLAs and functions inside functions
  2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
                   ` (8 preceding siblings ...)
  2004-03-08 15:53 ` pinskia at gcc dot gnu dot org
@ 2004-05-13 23:36 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-13 23:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-13 13:25 -------
Fixed by the merge from the tree-ssa into the mainline (Well actually this was fixed before 
that with a patch by Kenner).

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


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


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

end of thread, other threads:[~2004-05-13 13:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-18 20:51 [Bug c/13732] New: internal compiler error with structures sylvain at gplservice dot fr
2004-01-18 20:54 ` [Bug c/13732] " sylvain at gplservice dot fr
2004-01-18 21:00 ` dhazeghi at yahoo dot com
2004-01-18 21:07 ` [Bug c/13732] internal compiler error with structures with VLAs and functions inside functions pinskia at gcc dot gnu dot org
2004-01-18 21:08 ` pinskia at gcc dot gnu dot org
2004-01-18 22:17 ` pinskia at gcc dot gnu dot org
2004-01-28  5:58 ` [Bug c/13732] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-15 12:40 ` gdr at gcc dot gnu dot org
2004-03-01  1:47 ` mmitchel at gcc dot gnu dot org
2004-03-08 15:53 ` pinskia at gcc dot gnu dot org
2004-05-13 23:36 ` pinskia 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).