[Bug c/92063] [10 Regression] ICE in operation_could_trap_p, at tree-eh.c:2528 when compiling Python's Python/_warnings.c
romain.geissler at amadeus dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 11 08:00:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92063
--- Comment #1 from Romain Geissler <romain.geissler at amadeus dot com> ---
Python code is here:
https://github.com/python/cpython/blob/v3.7.4/Python/_warnings.c#L753
#define ascii_lower(c) ((c <= 127) ? Py_TOLOWER(c) : 0)
/* if filename.lower().endswith(".pyc"): */
if (len >= 4 &&
PyUnicode_READ(kind, data, len-4) == '.' &&
ascii_lower(PyUnicode_READ(kind, data, len-3)) == 'p' &&
ascii_lower(PyUnicode_READ(kind, data, len-2)) == 'y' &&
ascii_lower(PyUnicode_READ(kind, data, len-1)) == 'c')
{
*filename = PyUnicode_Substring(*filename, 0,
PyUnicode_GET_LENGTH(*filename)-1);
if (*filename == NULL)
goto handle_error;
}
else
Py_INCREF(*filename);
More information about the Gcc-bugs
mailing list