Compilation failure of 20010119-1.c under hpux at -O1 and above

John David Anglin
Mon Apr 30 12:40:00 GMT 2001

The test 20010119-1.c fails under hpux 10.20 on the 3.0 branch:

Executing on host: /xxx/gnu/gcc-3.0/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.0/objdir/gcc/ /xxx/gnu/gcc-3.0/gcc/testsuite/gcc.c-torture/execute/20010119-1.c  -w  -O1 -lm   -fPIC -o /xxx/gnu/gcc-3.0/objdir/gcc/testsuite/20010119-1.x1    (timeout = 1200)
/usr/ccs/bin/ld: Unsatisfied symbols:
   undef (code)

It appears that this test doesn't work under hpux because the constant
`20000' exceeds the maximum size to load in one insn.  In the intial
rtl, it is loaded in two insns using the high and lo_sum parts.
Inspite of REG_EQUAL notes on both pseudos, the test `(a) > 20000' and
the call to undef are not eliminated from the code.  The test will pass
if 20000 is changed to a smaller number, say 11.

I would guess that this shows that comparisons involving two psuedo
registers containing constants are not being eliminated.  This would
seem like a relatively important optimisation.

J. David Anglin                        
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

More information about the Gcc-bugs mailing list