alpha-dec-vms __sync_lock_test_and_set char/short -O2 fails on all 4.3.x and 4.4.x

Jay K jay.krell@cornell.edu
Mon Apr 26 04:42:00 GMT 2010


For the archives:

void f5( short* a,  short b,  short c)
    {  __sync_lock_test_and_set(a, b, c); }

jbook2:~ jay$  /obj/gcc442/avms/gcc/cc1 4.c -O2
 f5
Analyzing compilation unit
Performing interprocedural optimizations
 <visibility> <early_local_cleanups> <summary generate> <cp> <inline> <static-var> <pure-const>Assembling functions:
 f5
4.c: In function 'f5':
4.c:2: internal compiler error: in emit_move_insn, at expr.c:3405
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Seems to occur on all of 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.4.0, 4.4.1, 4.4.2, 4.4.3.
  I'm not sure I tried all of them, but I tried many.
It also occurs for char, unsigned short, presumably unsigned char.
This platform is a bit wierd because it has 64bit registers but 32bit long/void*/size_t.
It does not occur without -O2.
It does NOT occur on 4.5.0.
I'll compare 4.4.3 and 4.5.0, try to find a small patch to fix, since I'm using a 4.3.0-based tree.
ChangeLog doesn't make it obvious. I tried patching 4.3.0 with some 4.5.0 changes, before I thought to try the in-between versions.

 /src/gcc-4.3.0/configure -target alpha-dec-vms -disable-multilib -disable-dependency-tracking -disable-shared -enable-static -verbose -enable-sjlj-exceptions

There are also assertion failures and other problems in some of these releases when building libgcc.
e.g.:

/src/gcc-4.4.1/libgcc/../gcc/libgcc2.c: In function ‘__gcc_bcmp’:
/src/gcc-4.4.1/libgcc/../gcc/libgcc2.c:1993: error: unrecognizable insn:
(insn 61 60 62 6 /src/gcc-4.4.1/libgcc/../gcc/libgcc2.c:1987 (set (reg:DI 122)
        (plus:SI (subreg:SI (reg:DI 119) 0)
            (const_int 1 [0x1]))) -1 (nil))
/src/gcc-4.4.1/libgcc/../gcc/libgcc2.c:1993: internal compiler error: in extract_insn, at recog.c:2048
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [__gcc_bcmp.o] Error 1
make[1]: *** [all-target-libgcc] Error 2
make: *** [all] Error 2


Can just remove the __gcc_bcmp function I think.
(I don't have a working-enough cross toolset to know it isn't referenced.)



/src/gcc-4.4.2/gcc/config/alpha/vms-dwarf2eh.asm:31:Unknown pseudo-op: .global
/src/gcc-4.4.2/gcc/config/alpha/vms-dwarf2eh.asm:31:Rest of line ignored. 1st junk character valued 95 (_).m

Fix is to change it to .globl I think.

  - Jay

 		 	   		  



More information about the Gcc-help mailing list