1: # Various GCC/vax issues and invesigation #
2:
3: ## libgomp crash with -O2 ##
4: Repro:
5:
6: #!/bin/sh
7:
8: cat << EOF > oacc.i
9: int a, b;
10: int e() {
11: short *c = 0;
12: char d = c[a + 1];
13: b = d;
14: a += 2;
15: }
16: EOF
17: vax--netbsdelf-gcc -O2 -c oacc.i
18:
19: Asserts at emit-rtl.c:2310 gcc_assert (memory_address_addr_space_p (mode, addr, as));
20:
21: NetBSD avoids it with a [local diff](5f534f20bc66738c05c442a8f20088f55335b653/external/gpl3/gcc/dist/libgcc/gthr-posix.h#L418) to reload.c/dse.c.
22: It looks like a real bug in vax_legitimate_address_p not handling some addressing modes.
23: The code to handle offset(reg)[index] might be off: it doesn't like if neither xfoo0, xfoo1 are constant.
24:
25: ## unrecognizable insn with any optimization ##
26:
27: Repro:
28:
29: #!/bin/sh
30:
31: cat << EOF > decl.ii
32: struct a {
33: long long *b() const;
34: };
35: template <typename> class d : a {
36: public:
37: template <typename e> d(e);
38: long long f() const;
39: };
40: template <typename c> long long d<c>::f() const {
41: int g;
42: return b()[g];
43: }
44: int h;
45: bool i() {
46: d<int> j(h);
47: return j.f();
48: }
49: EOF
50: vax--netbsdelf-g++ -O2 -c decl.ii
51:
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb