diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-10-09 19:15:13 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-10-09 22:10:31 +0200 |
commit | 017969b193a135cd3bb63d5704bd11b62449f34e (patch) | |
tree | 30d63b5210ae0874d41191c76b6f2d7e2d790e50 /numpy | |
parent | 8615d5e57c7f07c41f5f5c87d3b8ab6da4bfb4ec (diff) | |
download | numpy-017969b193a135cd3bb63d5704bd11b62449f34e.tar.gz |
BUG: remove static from function to avoid gcc-4.1 miscompile
gcc 4.1.2 (e.g. in red hat 5) will miscompile the function when
inlining. Without static it will not inline solving the issue.
Closes gh-5163
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/arraytypes.c.src | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src index d2532ccf0..92752be92 100644 --- a/numpy/core/src/multiarray/arraytypes.c.src +++ b/numpy/core/src/multiarray/arraytypes.c.src @@ -4042,8 +4042,12 @@ datetime_dtype_metadata_clone(NpyAuxData *data) /* * Initializes the c_metadata field for the _builtin_descrs DATETIME * and TIMEDELTA. + * + * must not be static, gcc 4.1.2 on redhat 5 then miscompiles this function + * see gh-5163 + * */ -static int +NPY_NO_EXPORT int initialize_builtin_datetime_metadata(void) { PyArray_DatetimeDTypeMetaData *data1, *data2; |