This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients David.Edelsohn, skrah
Date 2020-09-04.20:06:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-09-04 20:06:51skrahsetrecipients: + skrah, David.Edelsohn
2020-09-04 20:06:51skrahsetmessageid: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org>
2020-09-04 20:06:51skrahlinkissue41721 messages
2020-09-04 20:06:51skrahcreate