Prof A Olowofoyeku wrote:
Same here. It segfaults on compiling error.pas
OK, I have build gcc-3.2.3 based gpc. I applied the following patch (includes the change Frank posted and my previous patch):
diff -u p.orig/declarations.c p/declarations.c --- p.orig/declarations.c Thu Mar 31 20:04:18 2005 +++ p/declarations.c Fri Apr 1 16:48:36 2005 @@ -328,7 +328,7 @@ } else { -#ifndef GCC_3_3 +#ifndef EGCS97 newlevel->shared_decl_lang_specific = (struct lang_decl *) xmalloc (sizeof (*(newlevel->shared_decl_lang_specific))); #else newlevel->shared_decl_lang_specific = (struct lang_decl *) ggc_alloc (sizeof (*(newlevel->shared_decl_lang_specific))); @@ -1584,7 +1584,7 @@ ggc_mark_tree (level->shadowed); ggc_mark_tree (level->blocks); ggc_mark_tree (level->this_block); - ggc_mark (shared_decl_lang_specific); + ggc_mark (level->shared_decl_lang_specific); } } #endif Common subdirectories: p.orig/demos and p/demos Common subdirectories: p.orig/diffs and p/diffs Common subdirectories: p.orig/doc and p/doc diff -u p.orig/gbe.h p/gbe.h --- p.orig/gbe.h Fri Mar 25 21:53:14 2005 +++ p/gbe.h Fri Apr 1 15:42:18 2005 @@ -162,6 +162,9 @@ extern void (*print_error_function) (const char *); extern PTR alloca (size_t); extern tree void_list_node; +#endif + +#ifndef GCC_3_3 #define copy_decl_lang_specific copy_lang_decl #endif
diff -u p.orig/lang.c p/lang.c --- p.orig/lang.c Thu Mar 31 19:52:05 2005 +++ p/lang.c Fri Apr 1 16:59:41 2005 @@ -1232,7 +1232,7 @@ #else
void -lang_mark_tree (int t) +lang_mark_tree (tree t) { if (TREE_CODE (t) == IDENTIFIER_NODE) {