This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fmt.c line 95 segfaults


>(gdb) bt
>#0  f_s (s=0x0, curloc=0) at fmt.c:95
>#1  0x12001d7a8 in pars_f (s=0x0) at fmt.c:370
>#2  0x120022418 in s_wsfe (a=0x120125c90) at wsfe.c:72
>#3  0x120002638 in MAIN__ () at ml0.f:152
>#4  0x12001b7ac in main (argc=0, argv=0x0) at main.c:128
[...]
>#ifdef KR_headers
>char *f_s(s,curloc) char *s;
>#else
>char *f_s(char *s, int curloc)
>#endif
>{
>        skip(s);

pars_f() parse the FORMAT string.  s_wsfe() is called by a compiled
Fortran module (f2c or g77) to Start a Write Sequential Formatted
External (basically, ordinary formatted WRITE or PRINT).  s_wsfe()
is passed a structure that contains, among other things, a pointer
to the FORMAT string.  The compiler encodes the data in this structure,
though of course some of it might come from the program itself at
run time.

Seems like that pointer is NULL, and if you can find out why, that
might identify the source of the problem.  In cases like this (64-bit
machine and all), it might be due to a mismatch between types/sizes
of the members structure of structure passed to s_wsfe() as seen by
the compiler and as seen by the run-time library (s_wsfe() itself).

        tq vm, (burley)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]