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: libf2c/1644: lapack routine segfaults on i686, but not on sparc


wilkenin@math.lbl.gov wrote:

[ C main program calls Fortran subroutines ]

> gcc broken.c -L. -llapack -lblas -lg2c -lm
> 
> the result is:
> info: 0, rcond: 1.08692e-16, ferr: 1.12918e-16, berr: 1.78001e-16
> Segmentation fault (core dumped)
> 
> but if I uncomment exit(1) there is no seg fault.  (I can also
> free all the malloc'ed space and then exit(1) with no seg fault).

Did you read the g77 documentation on Fortran code calling and being
called by code written in other languages ?

See "Other Languages" -> "Startup code" in the documentation.  If this
is not clear enough, feel free to suggest improvements :-)

Cheers,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

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