On Thu, Feb 03, 2000 at 11:53:02PM +0100, Reinhard Katzmann wrote:
> Hi Don!
>
> I have now tried to compile the code with f2c, and I get several
> errors when trying that: f2c -Nn802 -Nx400 pmx218.f
>
> g1etnote:
> Error on line 1088 of pmx218.f: Statement order error: declaration after DATA
> ...
>
> addmidi:
> Error on line 15113 of pmx218.f: Statement order error: declaration after DATA
>
Hmm, strange, I only got the first of the two .. and it was on a
different line! Oh, I see, I only got pmx-2.17 ...
Yes, the program does not obey the standard statement ordering
Declarations
COMMMON
DATA
EQUIVALENCE
There may be a type declaration after a data statement.
Simply put it before the data statement and it will pass.
Exactly.
> Warning on line 2817 of pmx218.f: local variable relacc never used
> Warning on line 2817 of pmx218.f: local variable midicrd never used
> Warning on line 2817 of pmx218.f: local variable nmidcrd never used
> Warning on line 2817 of pmx218.f: local variable numchan never used
> Warning on line 2817 of pmx218.f: local variable notmain never used
Tidy up. This is the same as in C, when you don't use local
variables, but it is harmless.
No need to. When you move the data statement after the declaration
block, the warnings disappear. Which is actually quite strange
behaviour of f2c, isn't it?
> > The best test is to run it through f2c. f2c *is* nothing else than the
> > f77 'authority', believe me.
> >
> > But I believe the problem may be with the C code or C compiler when you
> > are getting a segfault. (as the different results from using various
> > -O flags show).
>
> No, this is not logical, the test was made with g77, and g77 does not
Yes, I forgot for the moment.
Has g77 been rewritten as a native compiler? Back in '96 when I tried
it, it was just a front-end to gcc (i.e. a fortran-2-C converter).
Regards,
Stefan.