Diff for /wikisrc/users/maya/vax-gcc.mdwn between versions 1.1 and 1.5

version 1.1, 2019/08/29 12:43:34 version 1.5, 2019/08/29 20:40:51
Line 1 Line 1
 # Various GCC/vax issues and invesigation #  # Various GCC/vax issues and invesigation #
   
 # libgomp crash with -O2 #  ## libgomp crash with -O2 ##
 Repro:  Repro:
 ````  
 #!/bin/sh  
   
 cat << EOF > oacc.i      #!/bin/sh
 int a, b;      
 int e() {      cat << EOF > oacc.i
   short *c = 0;      int a, b;
   char d = c[a + 1];      int e() {
   b = d;        short *c = 0;
   a += 2;        char d = c[a + 1];
 }        b = d;
 EOF        a += 2;
 vax--netbsdelf-gcc -O2 -c oacc.i      }
 ````      EOF
       vax--netbsdelf-gcc -O2 -c oacc.i
   
 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 to reload.c/dse.c.  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 <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
   
 It looks like a real bug in vax_legitimate_address_p not handling some addressing modes  

Removed from v.1.1  
changed lines
  Added in v.1.5


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