[Python-3000] RELEASED Python 2.6a2 and 3.0a4
Marcin ‘Qrczak’ Kowalczyk
qrczak at knm.org.pl
Sun Apr 6 17:02:20 CEST 2008
Dnia 06-04-2008, nie o godzinie 16:29 +0200, "Martin v. Löwis" pisze:
> Depending on how much you care about this issue, feel free to contribute
> a patch. The alternatives I see is
> a) do nothing (obviously), trusting that Google will find this thread
> b) add something to the README
> c) detect the case in configure, and work around appropriately
Here is what I used in my code which triggered that bug:
AC_DEFUN([KO_CHECK_GCC_TREE_VRP_BUG], [
AC_MSG_CHECKING([whether $CC has a particular -ftree-vrp bug])
ko_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -O -ftree-vrp"
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
struct S {struct S *field;};
struct S True, False, Z;
static inline int f(void) {return 1;}
static inline int g(struct S **obj) {
return f() && *obj == &Z;
}
struct S **h(struct S **x) {
if (x)
return g(x) ? &True.field : &False.field;
else
return &True.field;
}
struct S **(*hptr)(struct S **x);
]], [[
struct S obj;
obj.field = 0;
hptr = h;
return hptr(&obj.field) == &True.field ? EXIT_SUCCESS : EXIT_FAILURE;
]])],
[ko_gcc_tree_vrp_bug=yes],
[ko_gcc_tree_vrp_bug=no],
[ko_gcc_tree_vrp_bug=unknown])
CFLAGS=$ko_save_CFLAGS
AC_MSG_RESULT($ko_gcc_tree_vrp_bug)
if test $ko_gcc_tree_vrp_bug = yes; then
CFLAGS="$CFLAGS -fno-tree-vrp"
fi
])
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the Python-3000
mailing list