https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71333
Bug ID: 71333 Summary: Broken Python extension produced Product: gcc Version: 5.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: yesint4 at yahoo dot com Target Milestone: --- When compiling Pteros library (https://sourceforge.net/projects/pteros/) g++ 5.3.1 produces broken Python extension module, which causes segfaults when used. The same code works fine with g++ 4.8 and with clang (any version). Compiler makes something completely wrong when compiling call to Python API function PyArray_FROM_OT at line 115 of this file: https://sourceforge.net/p/pteros/code/ci/experimental/tree/include/pteros/python/bindings_util.h The whole "if" block enclosing this line is executed infinitely like if it is an infinite "while" loop, not "if".