| Jeroen Demeyer on Wed, 07 Mar 2012 10:25:31 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: GCC 4.6.3 miscompiles PARI on OS X PPC |
Work-around:
diff -ru src/src/language/init.c src.patched/src/language/init.c
--- src/src/language/init.c 2012-02-11 10:57:38.000000000 +0100
+++ src.patched/src/language/init.c 2012-03-07 10:24:37.000000000 +0100
@@ -593,14 +593,16 @@
pari_init_functions(void)
{
stack_init(&s_MODULES, sizeof(*MODULES),(void**)&MODULES);
- stack_pushp(&s_MODULES,functions_basic);
stack_init(&s_OLDMODULES, sizeof(*OLDMODULES),(void**)&OLDMODULES);
- stack_pushp(&s_OLDMODULES,oldfonctions);
functions_hash = (entree**) pari_calloc(sizeof(entree*)*functions_tblsz);
pari_fill_hashtable(functions_hash,
new_fun_set? functions_basic: oldfonctions);
defaults_hash = (entree**) pari_calloc(sizeof(entree*)*functions_tblsz);
pari_add_defaults_module(functions_default);
+ /* Move this down to work around GCC bug
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330 */
+ stack_pushp(&s_MODULES,functions_basic);
+ stack_pushp(&s_OLDMODULES,oldfonctions);
}
void