Post a minimal example that displays this error or we'll be guessing,
perhaps wrongly, what you wrote. I suspect but don't know you used g95
but which version? On what system? (i386? x86_64? Windows? Sun? ...?)
and what messages (if any) it gave at compile time and (if it
compiled without errors but possibly with warnings) also at run time.
I know from bitter experience that it takes work to boil a 300-line
program that appears to exhibit a bug down to a 30-line one (or in
extreme cases a 3-line one) that exhibits the same bug, but it makes
diagnosis of the real problem much easier.
-- jfh