This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: segmentation fault error
On Thu, 2005-12-08 at 14:19 -0500, Iwan Kawrakow wrote:
> I'm not sure what the standards says about a program like that, but
> you get a segfault with g77 and ifort as well:
>
> ifort test.f95 && ./a.out
> forrtl: severe (174): SIGSEGV, segmentation fault occurred
> ...
>
> cat test.f
> program mist
> call sub('abc')
> end
>
> subroutine sub(str)
> character*(*) str
> str = 'a'
> return
> end
>
> g77 test.f && ./a.out
> Segmentation fault
>
> Same with SUNWpro 5.0 on Sun OS:
> f77 test.f && ./a.out
> *** TERMINATING ./a.out
> *** Received signal 11
> POSSIBLE ATTEMPT TO MODIFY CONSTANT
> Segmentation fault (core dumped)
>
xlf95 on powerpc64-linux doesn't fail.
It'll be nice to prompt some error message, similar to the above message
at least.
- Uttam