--- wikisrc/users/maya/vax-gcc.mdwn 2019/08/29 13:01:34 1.3 +++ wikisrc/users/maya/vax-gcc.mdwn 2019/08/29 20:39:43 1.4 @@ -1,6 +1,6 @@ # Various GCC/vax issues and invesigation # -# libgomp crash with -O2 # +## libgomp crash with -O2 ## Repro: #!/bin/sh @@ -21,3 +21,31 @@ Asserts at emit-rtl.c:2310 gcc_assert (m NetBSD avoids it with a [local diff](5f534f20bc66738c05c442a8f20088f55335b653/external/gpl3/gcc/dist/libgcc/gthr-posix.h#L418) to reload.c/dse.c. It looks like a real bug in vax_legitimate_address_p not handling some addressing modes. The code to handle offset(reg)[index] might be off: it doesn't like if neither xfoo0, xfoo1 are constant. + +## unrecognizable insn with any optimization ## + +Repro: + +#!/bin/sh + + cat << EOF > decl.ii + struct a { + long long *b() const; + }; + template class d : a { + public: + template d(e); + long long f() const; + }; + template long long d::f() const { + int g; + return b()[g]; + } + int h; + bool i() { + d j(h); + return j.f(); + } + EOF + vax--netbsdelf-g++ -O2 -c decl.ii +