Diff for /wikisrc/users/maya/vax-gcc.mdwn between versions 1.3 and 1.8

version 1.3, 2019/08/29 13:01:34 version 1.8, 2019/08/30 02:09:23
Line 1 Line 1
 # Various GCC/vax issues and invesigation #  # Various GCC/vax issues and invesigation #
   
 # libgomp crash with -O2 #  [WIP tree](gcc-mirror/)
   
   ## libgomp crash with -O2 ##
 Repro:  Repro:
   
     #!/bin/sh      #!/bin/sh
Line 18  Repro: Line 20  Repro:
   
 Asserts at emit-rtl.c:2310 gcc_assert (memory_address_addr_space_p (mode, addr, as));  Asserts at emit-rtl.c:2310 gcc_assert (memory_address_addr_space_p (mode, addr, as));
   
 NetBSD avoids it with a [local diff](5f534f20bc66738c05c442a8f20088f55335b653/external/gpl3/gcc/dist/libgcc/gthr-posix.h#L418) to reload.c/dse.c.    NetBSD avoids it with a [local diff](https://github.com/NetBSD/src/commit/e437e96750193b86d0464965661f616e011056fa) to reload.c/dse.c.  
 It looks like a real bug in vax_legitimate_address_p not handling some addressing modes.    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.  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 <typename> class d : a {
       public:
         template <typename e> d(e);
         long long f() const;
       };
       template <typename c> long long d<c>::f() const {
         int g;
         return b()[g];
       }
       int h;
       bool i() {
         d<int> j(h);
         return j.f();
       }
       EOF
       vax--netbsdelf-g++ -O2 -c decl.ii
   
   This errors out with:
   
       $ env PATH=$PWD:$PATH ./xgcc -fno-use-linker-plugin -c -O2 ~/oacc/decl.ii -fno-tree-vectorize
       /home/fly/oacc/decl.ii: In function 'bool i()':
       /home/fly/oacc/decl.ii:17:1: error: unrecognizable insn:
          17 | }
             | ^
       (insn 13 12 14 2 (set (reg:SI 33)
               (subreg:SI (mem:DI (plus:SI (mult:SI (reg/v:SI 24 [ g ])
                               (const_int 8 [0x8]))
                           (reg/f:SI 23 [ _6 ])) [1 *_10+0 S8 A32]) 4)) "/home/fly/oacc/decl.ii":16:14 -1
            (nil))
       during RTL pass: vregs
       /home/fly/oacc/decl.ii:17:1: internal compiler error: in extract_insn, at recog.c:2310
       
   Providing a trivial scheduling will avoid subregs of mem.  
   However, this doesn't work for us. Our crash and mem subregs happen at a too early pass, most likely.

Removed from v.1.3  
changed lines
  Added in v.1.8


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb