> I'm not a language lawyer; is this a legal program? (If the program
> is legal, should I file a PR?)
Mike Stump already filed a PR about this, PR 28778 and I gave a full testcase
which shows that this is legal code and the compiler should not be removing
the store.
Oh and I marked it as a
>
> Here's my reduced testcase:
>
> typedef long GLint;
> extern void aglChoosePixelFormat(const GLint *);
> void find(const int *alistp) {
>const int *blist;
>int list[32];
>if (alistp)
> blist = alistp;
>else {
> list[3] = 42; /* this store disappears with -O1 -f
Here's my reduced testcase:
typedef long GLint;
extern void aglChoosePixelFormat(const GLint *);
void find(const int *alistp) {
const int *blist;
int list[32];
if (alistp)
blist = alistp;
else {
list[3] = 42; /* this store disappears with -O1 -fstrict-
aliasing */
blis