Error: Syntax error in EQUIVALENCE statement at (1)

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Jan 29 22:02:00 GMT 2019


On Tue, Jan 29, 2019 at 02:19:16PM -0700, Andrew F. Nelson via fortran wrote:
> On 1/29/19 1:09 PM, Steve Kargl wrote:
> > On Tue, Jan 29, 2019 at 11:57:49AM -0700, Andrew F. Nelson via fortran wrote:
> >> On 1/29/19 11:34 AM, Steve Kargl wrote:
> >>>
> >>> I think we'll need to see the code to help.
> >>>
> >>
> >> Sigh. Probably take me a week to cut the code down so far that I could
> >> give something out. I know that 'seeing the code' is a basic first step
> >> and not being able to do that really bites into any ability to diagnose
> >> though, so I understand.
> > 
> > OTOH, these exercises of cutting down often lead to finding
> > bugs and use of extensions to the language (that should be
> > avoided).
> > 
> 
> I know. Done them before :/ Was just groaning at the workload I saw
> in my near future, or the (bad) papering over jobs I could do instead
> to get rid of this error and leave the problem for the next poor
> schmuck in my shoes.
> 
> 
> >>> Have you passed your code through other compilers (eg, Intel, PGI, NAG)?
> >>>
> >>
> >> Yes. It compiles fine under intel and xlf (many versions over the years).
> > 
> > I know intel by default accepts a large number of extensions.
> > Do you or can you use intel and request standards conformation
> > (e.g., -stand f08)?
> 
> We use these flags routinely and are up to the f03 standard in this codebase,
> and only recently moved to that from 95. There are very few (none?) non-conformancies
> that exist in the code, mostly having to do with calling out to C
> without using c binding stuff. None relevant for this issue. But yes,
> a good question/check to bring up.

This is discouraging for gfortran as it indicates some bug
is lurking in gfortran and you've managed to tickle it!

> >> In reference to your other comment about the error pointer being misplaced
> >> (not pointing at a specific variable), I have tried limiting the use
> >> statement to a single variable as:
> >>
> >> use the_module, only : var
> >>
> >> for each of the variables in the use line one at a time. They all trigger
> >> the same error.
> >>
> >> The trouble with the error message that I'm having is that it implicates
> >> an equivalence of some sort, but there is no equivalencing going on that
> >> I can see. Can you speculate on what gcc defines as an equivalence or
> >> equivalence problem that is so much more general/different than other
> >> compilers?
> 
> <stale error generation discussion>
> 
> Very interesting and plausible to me, as a reason for this problem.
> Does it imply also that a gfortran improvement could be had where it
> could be made to generate a non-stale error message? (Assuming I'm
> able to get time to do a cutdown on it and send you folks something).
> 

I think it may go beyond a stale error message.  Something within
gfortran seems to indicate invalid code.  But, Intel with standard
conformance seems to validate your code.  Yes, gfortran improvement
is possible if we can get code that reproduces the issue.

Unfortunately, the code may sit in a bug report for a (long) time due 
to available manpower.

-- 
Steve



More information about the Fortran mailing list