File:  [NetBSD Developer Wiki] / wikisrc / users / maya / vax-gcc.mdwn
Revision 1.3: download - view: text, annotated - select for diffs
Thu Aug 29 13:01:34 2019 UTC (3 years, 9 months ago) by maya
Branches: MAIN
CVS tags: HEAD
more info, more markdown

    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.

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