This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gpc internal compiler error in `emit_library_call_value'
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gpc internal compiler error in `emit_library_call_value'
- From: "Ricky W. Butler" <r dot w dot butler at larc dot nasa dot gov>
- Date: Tue, 15 Feb 2000 12:31:25 -0500 (EST)
Attempting to compile the attached program "bug.p" with
gpc -c bug.p
produces
gpc -c bug.p
bug.p: In function `Fastqt':
bug.p:107: Internal compiler error in `emit_library_call_value', at calls.c:3198
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.
The command
gpc -v
produces
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
gpc version 19991030, based on 2.95.2 19991024 (release)
My machine is an Sun Ultra 5.
NOTE: changing line 107 from
scalefactor := 1.0 / scalefactor;
to
scalefactor := 1 / scalefactor;
eliminates the internal error.
NOTE2: This problem does not arise on my Linux gpc compiler
Rick Butler
P.S. This is a stripped down version of a much larger program:
---------------------------------------------------------
program bug(input,output);
const
maxstate = 1000000;
type
statetypes = -1..maxstate;
tranclass = (class1,class2,class3);
hptr = ^hist;
hist = record
st: statetypes;
next: hptr;
case cl: tranclass of
class1: (lam,gam: double);
class2: (fract: double);
class3: (alpha,muh: double);
end;
const
maxn = 100;
twicemaxn = 2*maxn;
type
index = 1..maxn;
diagonal = array[ 1..maxn ] of double;
squarematrix = array[ index,index ] of double;
var
tclock: integer;
(*a : array[index, 1..2*maxn] of double;*)(*ultrix-3/88-phs*)
a : array[index, 1..twicemaxn] of double;(*ultrix-3/88-phs*)
m : squarematrix;
p : array[ index, 2..9 ] of double;
lambda, alpha : diagonal;
n : integer;
idig,jdig: integer;
qtlisttoobig: boolean;
listlevel: integer; (* list level *)
function fastqt ( qtlist : hptr; t : double ) : double;
label 999;
var
i, j, s, w: integer;
q: hptr;
scalefactor: double;
anorm,ynorm,snorm,eanorm,ta,digc: double;
begin (* function fastqt *)
n := 1; q := qtlist; qtlisttoobig := false;
repeat (* acquire lambda & alphas from linked list. *)
if n >= maxn then
begin
if listlevel >= 6 then writeln(' >>> Q(T) LIST TOO LONG');
n := maxn; m[n,1] := 0.0;
qtlisttoobig := true;
goto 999;
end;
if q^.cl = class1 then
begin
lambda[n] := q^.lam;
alpha[n] := -q^.lam - q^.gam;
n := n + 1;
end;
q := q^.next;
until q = nil;
for i := 1 to n-1 do (* work henceforth with t*a but keep *)
begin (* same notation. *)
lambda[i] := lambda[i]*t;
alpha[i] := alpha[i]*t;
end;
(* form the full matrix m = t*a in memory. *)
for i := 1 to n do
for j := 1 to n do
m[i,j] := 0.0;
anorm := abs(alpha[1]); alpha[n] := 0.0;
for i := 1 to n-1 do
begin
m[i,i] := alpha[i];
m[i+1,i] := lambda[i];
ta := abs(lambda[i]) + abs(alpha[i+1]);
if ta > anorm then anorm := ta;
(* writeln(' m[',i:1,',',i:1,'] = ',m[i,i]);
writeln(' m[',i+1:1,',',i:1,'] = ',m[i+1,i]); *)
end;
digc := 24.00000000000e+00*n;
if (anorm > 1.0) then digc := digc*anorm;
idig := 15 - trunc( ln(digc+0.5)/ln(10.0));
(* writeln(' n,anorm,digc,idig = ',n,anorm,digc,idig); *)
(* now examine m for size of its components. *)
s := 0;
if (anorm > 1.0) then
begin
scalefactor := 1.0;
repeat
scalefactor := scalefactor * 2.0;
s := s + 1;
until scalefactor > anorm;
scalefactor := 1.0 / scalefactor;
for i := 1 to n-1 do
begin
alpha[i] := alpha[i]*scalefactor;
lambda[i] := lambda[i]*scalefactor;
m[i,i] := m[i,i]*scalefactor;
m[i+1,i] := m[i+1,i]*scalefactor;
end;
end;
999: fastqt := m[n,1];
end; (* fast_qt *)
begin
end.