This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bad code generated on alpha[ev4,5], latest snapshots


The testcase below produces
1 2 3 4
1 2 3 0
1 2 3 0
no matter of optimization.
foo() is a nop.

Ivan.

#include <stdio.h>

extern void foo(void *);

int main()
{
	short tst[4];

	tst[0] = 1;
	tst[1] = 2;
	tst[2] = 3;
	tst[3] = 4;
	printf("%d %d %d %d\n", tst[0], tst[1], tst[2], tst[3]);
	foo(tst);
	printf("%d %d %d %d\n", tst[0], tst[1], tst[2], tst[3]);
	tst[3] = 4;
	printf("%d %d %d %d\n", tst[0], tst[1], tst[2], tst[3]);
	return 0;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]