New submission from Stefan Krah <ste...@bytereef.org>:
At least the xlc version on AIX 7.1 has aggressive optimizations even with -O: ==================================================================== #include <stdio.h> #include <stdlib.h> static int f(long *a, long long *b) { int t = *a; *b = 0; // cannot change *a return *a - t; // can be folded to zero } int main(void) { long a = 10; printf("%d\n", f(&a, (long long *)&a)); return 0; } ==================================================================== $ xlc -O -o alias alias.c $ ./alias 0 $ $ xlc -O -qalias=noansi -o alias alias.c $ ./alias -10 ---------- components: +Build type: -> behavior versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41721> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com