Board index » delphi » GPC errors on Solaris

GPC errors on Solaris

Anyone else struck this problem with gpc on Solaris. Certain reserved words
generate the following :-

gpc: Internal compiler error: program gpc1 got fatal signal 11

For example, using the built-in "page" procedure as in

program hello;
begin
   page;
   writeln("Hello world");
end.

Remove the call to page and the program compiles and runs ok.

I'm using GNU Pascal version 20011215, based on gcc-2.95.2 19991024
(release) on a Sun E250 running Solaris 8. Version 20020304 gives the same
result.

Mike McCarthy
School of Psychology
The University of Queensland

 

Re:GPC errors on Solaris


Quote
"Michael McCarthy (IMAP)" wrote:

> Anyone else struck this problem with gpc on Solaris. Certain
> reserved words generate the following :-

> gpc: Internal compiler error: program gpc1 got fatal signal 11

> For example, using the built-in "page" procedure as in

> program hello;
> begin
>    page;
>    writeln("Hello world");
> end.

> Remove the call to page and the program compiles and runs ok.

> I'm using GNU Pascal version 20011215, based on gcc-2.95.2
> 19991024 (release) on a Sun E250 running Solaris 8. Version
> 20020304 gives the same result.

Possible work-around - use "page(output)".

It might be worth checking the action of eof and eoln also,
although they default to input and so may be entirely separate
code.

--
Chuck F (cbfalco...@yahoo.com) (cbfalco...@XXXXworldnet.att.net)
   Available for consulting/temporary embedded and systems.
   (Remove "XXXX" from reply address. yahoo works unmodified)
   mailto:u...@ftc.gov  (for spambots to harvest)

Re:GPC errors on Solaris


["page" causes gpc seg fault under Solaris..]

"CBFalconer"  wrote :-

Quote
> Possible work-around - use "page(output)".

Yep, that fixed it. Thanks....

Quote
> It might be worth checking the action of eof and eoln also,
> although they default to input and so may be entirely separate
> code.

No, they're ok ...

Thanks
Mike M.

Re:GPC errors on Solaris


Quote
"Michael McCarthy (IMAP)" wrote:

> ["page" causes gpc seg fault under Solaris..]

> "CBFalconer"  wrote :-
> > Possible work-around - use "page(output)".

> Yep, that fixed it. Thanks....

In general I make a practice of NOT using the default input/output
file specification, but actually specifying them.  This greatly
eases conversion when you want to use the same routine or code
snippet on other files, and on most systems creates zero extra
code.

--
Chuck F (cbfalco...@yahoo.com) (cbfalco...@XXXXworldnet.att.net)
   Available for consulting/temporary embedded and systems.
   (Remove "XXXX" from reply address. yahoo works unmodified)
   mailto:u...@ftc.gov  (for spambots to harvest)

Re:GPC errors on Solaris


In <a75t39$m0...@bunyip.cc.uq.edu.au>,
Michael McCarthy \(IMAP\) <m.mccar...@psy.uq.edu.au> wrote:

Quote
> Anyone else struck this problem with gpc on Solaris. Certain reserved words
> generate the following :-

> gpc: Internal compiler error: program gpc1 got fatal signal 11

> For example, using the built-in "page" procedure as in

> program hello;
> begin
>    page;
>    writeln("Hello world");
> end.

> Remove the call to page and the program compiles and runs ok.

Thanks for the report. The following is a fix:

--- p/rtscall.c.orig    Fri Mar 22 19:25:48 2002
+++ p/rtscall.c Fri Mar 22 19:27:08 2002
@@ -2399,7 +2399,7 @@
   case bp_TRUNCATE:
   case bp_FLUSH:
   case bp_ERASE:
-    fpar = do_ptype (type, 1, 1);
+    fpar = do_ptype (TREE_TYPE (TREE_VALUE (apar)), 1, 1);
     break;

   case bp_RENAME:

Since you say "certain reserved words" (well, built-in identifiers,
actually), does it also affect other identifiers? The bug fixed here
was specific to `Page'.

Quote
> "CBFalconer"  wrote :-

> > It might be worth checking the action of eof and eoln also,
> > although they default to input and so may be entirely separate
> > code.

> No, they're ok ...

Indeed, the code for them was correct, as were `Read[Ln]' and
`Write[Ln]'. I think that's all routines that may add an implicit
Input/Output parameter.

In <3C96FFBC.4DD12...@yahoo.com>,

Quote
CBFalconer <cbfalco...@yahoo.com> wrote:
> In general I make a practice of NOT using the default input/output
> file specification, but actually specifying them.  This greatly
> eases conversion when you want to use the same routine or code
> snippet on other files, and on most systems creates zero extra
> code.

Indeed, GPC generates the same code in both cases. Just out of
curiosity: Do you also do so for simple `Write[Ln]'s to Output?

Frank

--
Frank Heckenbach, frank@[NOSPAM.REMOVE.THIS]g-n-u.de, http://fjf.gnu.de/
GnuPG and PGP keys:         http://fjf.gnu.de/plan (7977168E)
Pascal code, BP CRT bugfix: http://fjf.gnu.de/programs.html
Free GNU Pascal Compiler:   http://home.pages.de/~GNU-Pascal/

Re:GPC errors on Solaris


Quote
Frank Heckenbach wrote:
> CBFalconer <cbfalco...@yahoo.com> wrote:

> > In general I make a practice of NOT using the default input/output
> > file specification, but actually specifying them.  This greatly
> > eases conversion when you want to use the same routine or code
> > snippet on other files, and on most systems creates zero extra
> > code.

> Indeed, GPC generates the same code in both cases. Just out of
> curiosity: Do you also do so for simple `Write[Ln]'s to Output?

Yes.  Also eof and eoln.  I have too often built something fairly
complex, wanted to rework it to use designated files, and had to
go over things with a fine comb to do so.  I always missed
something :-(

--
Chuck F (cbfalco...@yahoo.com) (cbfalco...@XXXXworldnet.att.net)
   Available for consulting/temporary embedded and systems.
   (Remove "XXXX" from reply address. yahoo works unmodified)
   mailto:u...@ftc.gov  (for spambots to harvest)

Other Threads