www.delorie.com/gnu/docs/gcc/g77_564.html   search  
 
Buy the book!


Using and Porting GNU Fortran

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.4.11 Inconsistent Calling Sequences

Code containing inconsistent calling sequences in the same file is normally rejected--see 22.5 GLOBALS. (Use, say, ftnchek to ensure consistency across source files. See section Generating Skeletons and Prototypes with f2c.)

Mysterious errors, which may appear to be code generation problems, can appear specifically on the x86 architecture with some such inconsistencies. On x86 hardware, floating-point return values of functions are placed on the floating-point unit's register stack, not the normal stack. Thus calling a REAL or DOUBLE PRECISION FUNCTION as some other sort of procedure, or vice versa, scrambles the floating-point stack. This may break unrelated code executed later. Similarly if, say, external C routines are written incorrectly.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003