gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Ulm Library Woes


From: Waldek Hebisch
Subject: Re: [Gm2] Ulm Library Woes
Date: Sat, 30 Sep 2006 18:49:40 +0200 (CEST)

> John O Goyo <address@hidden> writes:
> 
> > Greetings:
> > 
> > I tried building gm2 on gcc-4.0.1 (on SuSE Linux 8.3) and was rewarded
> > with the following.
> > 
> > ./xgm2 -Wnil -Wcase -Wbounds -Wreturn -g  -funbounded-by-reference
> > -Wverbose-unbounded -Wpim -Wpedantic-param-names -Wextended-opaque
> > -Wpedantic-cast -c -B./stage1/gm2
> > -I../../gcc-4.1.0/gcc/gm2/ulm-lib-gm2/std:../../gcc-4.1.0/gcc/gm2/ulm-lib-gm2/sys:../../gcc-4.1.0/gcc/gm2/gm2-libs
> > ../../gcc-4.1.0/gcc/gm2/ulm-lib-gm2/std/RealConv.mod -o
> > gm2/ulm-lib-gm2/std/RealConv.o
> > Internal error: Segmentation fault
> > Please report this crash to the GNU Modula-2 mailing list <address@hidden>
> > make[2]: *** [gm2/ulm-lib-gm2/std/RealConv.o] Error 1
> > 
> > 
> > The Ulm libraries also cause me grief trying to build on HP-UX.  Is
Gaius Mulley wrote: 
> it appears that gm2 (when based on gcc-4.1.0) is seg violating when
> compiling nested procedures.  (I see 111 regression tests fail on my
> machine running Etch Athlon 64 Debian GNU/Linux).
> 

AFAICS gm2 mishandles nested procedures: 'cgraph_finalize_function'
(and 'gimplify_function_tree') should be called only for top-level
procedures. Nested procedures should be sent to to 'cgraph_node'.

The following allows me to go past the error (but other follow ...):

--- gm2/gccgm2.c        2006-09-29 16:24:55.000000000 +0200
+++ gcc-4.1.1/gcc/gm2/gccgm2.c  2006-09-30 18:40:41.000000000 +0200
@@ -7968,11 +7968,16 @@ gccgm2_BuildEndFunctionCode (tree fndecl
                                     BLOCK_VARS (block),
                                     cur_stmt_list, block);
 
+  if (!nested) {
   gimplify_function_tree (fndecl);
 
   current_function_decl = fndecl;
   cgraph_finalize_function (fndecl, nested);
   current_function_decl = NULL;
+  } else {
+    (void) cgraph_node (fndecl);
+    current_function_decl = DECL_CONTEXT (fndecl);
+  }
   cur_stmt_list = NULL;
 
   // printf("ending scope %s\n", IDENTIFIER_POINTER(DECL_NAME (fndecl)));


-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]