8000 BUG: remove static from function to avoid gcc-4.1 miscompile · numpy/numpy@017969b · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 017969b

Browse files
committed
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
1 parent 8615d5e commit 017969b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

numpy/core/src/multiarray/arraytypes.c.src

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4042,8 +4042,12 @@ datetime_dtype_metadata_clone(NpyAuxData *data)
40424042
/*
40434043
* Initializes the c_metadata field for the _builtin_descrs DATETIME
40444044
* and TIMEDELTA.
4045+
*
4046+
* must not be static, gcc 4.1.2 on redhat 5 then miscompiles this function
4047+
* see gh-5163
4048+
*
40454049
*/
4046-
static int
4050+
NPY_NO_EXPORT int
40474051
initialize_builtin_datetime_metadata(void)
40484052
{
40494053
PyArray_DatetimeDTypeMetaData *data1, *data2;

0 commit comments

Comments
 (0)
0