* f2c too?
@ 1997-05-23 12:34 Christopher J. Grayce
0 siblings, 0 replies; 4+ messages in thread
From: Christopher J. Grayce @ 1997-05-23 12:34 UTC (permalink / raw)
Retrieved f2c-19960205-8.alpha.rpm and f2c-libs-19960205-8.alpha.rpm
from Redhat 4.2 distribution and installed. Using this source:
program foo
integer i
double precision x
write(6,fmt='(i3," foo ",f12.6)') i,x
stop
end
I try:
f2c bar.f
gcc bar.c -lf2c -lm
a.out
And get the usual segmentation violation. If I run f2c on a larger
(but still relatively trivial) Fortran program, f2c itself crashes
with a FPE ``while evaluating a constant''. Incidentally the SIGSEGV
was recorded in /var/log/messages as "memory violation at pc=15555670864
rp=155556712d8 (bad address = 00000000).
Hardware is PC164 alpha clone, 2.0.30 kernel compiled from RedHat 4.1
sources. gcc is from gcc-2.7.2.1-2.alpha.rpm.
Any help appreciated.
Christopher Grayce
University of California at Irvine
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: f2c too?
@ 1997-05-23 13:52 J
0 siblings, 0 replies; 4+ messages in thread
From: J @ 1997-05-23 13:52 UTC (permalink / raw)
Christopher Grayce writes:
>Retrieved f2c-19960205-8.alpha.rpm and f2c-libs-19960205-8.alpha.rpm
>from Redhat 4.2 distribution and installed. Using this source:
>
> program foo
> integer i
> double precision x
> write(6,fmt='(i3," foo ",f12.6)') i,x
> stop
> end
>
> try:
> f2c bar.f
> gcc bar.c -lf2c -lm
> a.out
>
>And get the usual segmentation violation. If I run f2c on a larger
>(but still relatively trivial) Fortran program, f2c itself crashes
>with a FPE ``while evaluating a constant''. Incidentally the SIGSEGV
>was recorded in /var/log/messages as "memory violation at pc=15555670864
>rp=155556712d8 (bad address = 00000000).~v
This happened to me. Suddenly I found that g77 and f2c no longer worked.
They behaved as you describe above. I reinstalled gcc-2.7.2.1, glibc, and f2c
from RedHat 4.1. F2c was still broken. Poked around at the libraries a bit,
thinking something must be screwed up there. Couldn't find anything.
Reinstalled RedHat 4.1 (as an ungrade, keeping my config files). F2c still
didn't work. Finally I wiped the hard drive and did a clean install of
4.1. This 'fixed' it.
The only thing I can think of that may have contributed to this is that
at one point I had installed glibc-2.0.2, and then later removed it. But I
would think that reinstalling glibc from RedHat 4.1 would fix things then.
I did find something else that is 'broken' with gcc/g77. If I compile a kernel
(2.0.29) using gcc/g77 (built using my hack), smbfs doesn't work correctly.
I can mount filesystems, but no files show up in the mounted filesystems.
This, of course, doesn't inspire confidence, but aside from this I've
seen no other bad behavior. Except of course for that mentioned above,
but it seems likely that its not a gcc/g77 problem, but something else.
- J
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: f2c too?
[not found] <199705231234.FAA01649@wasatch.ps.uci.edu>
@ 1997-05-23 15:33 ` Michal Jaegermann
0 siblings, 0 replies; 4+ messages in thread
From: Michal Jaegermann @ 1997-05-23 15:33 UTC (permalink / raw)
The fact that you have the same problem with g77 and f2c (there
two quite different implementations) seems to indicate that the
problem lies somewhere else (although I have no idea where).
Maybe the fact that you are using unitialized variables? I do not
remember right now, but does Fortran guarantees that these values
will be wiped clean? Does f2c?
> Using this source:
>
> program foo
> integer i
> double precision x
> write(6,fmt='(i3," foo ",f12.6)') i,x
> stop
> end
>
> I try:
> f2c bar.f
Why you are not using fort77 driver? Easier on your fingers
and gdb likes results better. :-)
> gcc bar.c -lf2c -lm
> a.out
>
> And get the usual segmentation violation.
Debugger time to try to get more precise information.
I can only tell you that on two different Alpha boxes, not very
dissimilar to what you have software wise, your program prints:
0 foo .000000
Michal
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: f2c too?
@ 1997-05-24 3:56 Michal Jaegermann
0 siblings, 0 replies; 4+ messages in thread
From: Michal Jaegermann @ 1997-05-24 3:56 UTC (permalink / raw)
This was an attempt to respond directly to Christopher J. Grayce,
who asked me about details of my system, but email to an address
from his mail header returns with:
----- The following addresses had permanent fatal errors -----
cgrayce@wasatch.ps.uci.edu
----- Transcript of session follows -----
... while talking to wasatch.ps.uci.edu.:
>>> RCPT To:<cgrayce@wasatch.ps.uci.edu>
<<< 550 <cgrayce@wasatch.ps.uci.edu>... User unknown
550 cgrayce@wasatch.ps.uci.edu... User unknown
Remote-MTA: DNS; wasatch.ps.uci.edu
Diagnostic-Code: SMTP; 550 <cgrayce@wasatch.ps.uci.edu>... User unknown
Last-Attempt-Date: Fri, 23 May 1997 17:49:08 -0600
so here we go:
>
> (1) A seg fault for a variable, initialized or no, is a compiler
> bug.
Or a library, or a hardware, or .... It does not seem to happen
on other machines with the same compiler.
> (2) The debugger tells me nothing except that the program gets
> a segmentation violation.
So what is a backtrace then? Did you compile with debugging
enabled? Even if it directs you to a library, this is an information.
> The problem is clearly not in my code,
Agreed.
> (3) You could help, indeed, by telling me a little more about
> what hardware you have,
At least this one which I have handy here (it works correctly)
NoName.
> the distribution,
RH 4.1
> kernel version,
2.0.30
> library
> versions,
Name : glibc Distribution: Red Hat Linux Vanderbilt
Version : 0.961212 Vendor: Red Hat Software
Release : 4 Build Date: Tue Feb 18 10:48:56 1997
Install date: Mon Mar 24 20:19:25 1997 Build Host: spacely.redhat.com
Group : Development/Libraries/Libc Source RPM: glibc-0.961212-4.src.rpm
Size : 4199921
> and how you got your g77 to compiler correctly.
I did not mention a word about g77. I only posted, in a response to
your "f2c" too, results from f2c.
The other machine is PC164, with 4.0, 2.0.27 and updated libraries.
Michal
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1997-05-24 3:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-05-24 3:56 f2c too? Michal Jaegermann
[not found] <199705231234.FAA01649@wasatch.ps.uci.edu>
1997-05-23 15:33 ` Michal Jaegermann
-- strict thread matches above, loose matches on Subject: below --
1997-05-23 13:52 J
1997-05-23 12:34 Christopher J. Grayce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox