Adriaan van Os wrote:
Waldek Hebisch wrote:
Anyway, I would like to see assembler output (what gpc -S -O3 produces) -- the output from cross-compiler at first glance looks OK.
Hello.s is included.
AFAIKS Darwin backend is doing something very strange when inlining Pascal initialization routines (tries to call them like external ones).
If problem is limited to initialization (as a little experiment suggest), then the following patch is w good workaround. It forbids inlining initialization routines -- such inlining is useless anyway.
--- gpc-20030830/p/declarations.c.pp Sat Apr 24 19:28:04 2004 +++ gpc-20030830/p/declarations.c Sat Apr 24 19:28:46 2004 @@ -2521,6 +2521,7 @@ if (!DECL_LANG_SPECIFIC (decl)) DECL_LANG_SPECIFIC (decl) = allocate_decl_lang_specific (); TREE_STATIC (decl) = 1; + DECL_UNINLINABLE (decl) = 1; DECL_ARGUMENTS (decl) = args; DECL_RESULT (decl) = build_decl (RESULT_DECL, NULL_TREE, result); announce_function (decl);