This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13732] New: internal compiler error with structures


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]