[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

peter.bisroev at groundlabs dot com gcc-bugzilla@gcc.gnu.org
Sat Feb 8 01:05:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #139 from Peter Bisroev <peter.bisroev at groundlabs dot com> ---
(In reply to dave.anglin from comment #137)
> You need to at least apply patch from comment#72.  This fixes regression
> from 4.7.x.  You should also
> consider the last patch set from The Written Word.  It was stated that it's
> possible to get a full bootstrap
> with it although there are issues.

(In reply to dave.anglin from comment #138)
> I think you need the patch from comment 63 as well

Thank you for the suggestions Dave. I have applied patch from comment#72 and
the behavior did not change. With default make command:
  gmake -j8 bootstrap \
    STAGE1_CFLAGS="-D_XOPEN_SOURCE_EXTENDED" \
    STAGE1_CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED"

I get PCREL21B errors during linking as were shown previously. When using -Os
with STAGE1_CFLAGS and STAGE1_CXXFLAGS I get internal compiler error as
described in my comment#135.

I also took a look at the last patch set in attachment 46623 from The Written
Word in comment#94 as you have suggested. It actually contains the patches that
you have already mentioned:
- the patch from comment#72 in r214747-regression.patch
- the patch from comment#63 in PR60465-regression.patch

So I applied this entire patch set and with default make command as above, I
get exactly the same thing as before, PCREL21B errors during linking of stage1.
If I compile stage 1 with -Os or -O2 I get internal compiler error as described
above. However my ICEs seem to happen at a different stage of compilation than
what has been reported already.

It is essentially this command:
  /home/pbisroev/src/build/./gcc/xgcc \
    -B/home/pbisroev/src/build/./gcc/ \
    -xc -nostdinc /dev/null -S -o /dev/null \
    -fself-test=/home/pbisroev/src/gcc-8.3.0/gcc/testsuite/selftests 

Which eventually calls cc1 that ICEs:
  /home/pbisroev/src/build/./gcc/cc1 -quiet -nostdinc -v \
    -iprefix /home/pbisroev/src/build/gcc/../lib/gcc/ia64-hp-hpux11.31/8.3.0/ \
    -isystem /home/pbisroev/src/build/./gcc/include \
    -isystem /home/pbisroev/src/build/./gcc/include-fixed \
    /dev/null -quiet -dumpbase null -auxbase-strip /dev/null \
    -version \
    -fself-test=/home/pbisroev/src/gcc-8.3.0/gcc/testsuite/selftests \
    -o /dev/null

I am not sure how these selftests work yet but will take a look into them to
see if we can reproduce a reliable minimal test case. However this is what I
see in GDB for now:
----------------------------------------
(gdb) r
Starting program: /home/pbisroev/src/build/./gcc/cc1 -quiet -nostdinc -iprefix
/home/pbisroev/src/build/gcc/../lib/gcc/ia64-hp-hpux11.31/8.3.0/ -isystem
/home/pbisroev/src/build/./gcc/include -isystem
/home/pbisroev/src/build/./gcc/include-fixed /dev/null -quiet -dumpbase null
-auxbase-strip /dev/null -version
-fself-test=/home/pbisroev/src/gcc-8.3.0/gcc/testsuite/selftests
GNU C17 (GCC) version 8.3.0 (ia64-hp-hpux11.31)
        compiled by GNU C version 4.7.4, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C17 (GCC) version 8.3.0 (ia64-hp-hpux11.31)
        compiled by GNU C version 4.7.4, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 6adcccc5ed57899a8ef4c993d4479438

Program received signal SIGSEGV, Segmentation fault
  si_code: 1 - SEGV_MAPERR - Address not mapped to object.
0x79e7a40 in <unknown_procedure> ()
(gdb) bt
#0  0x79e7a40 in <unknown_procedure> ()
warning: Attempting to unwind past bad PC 0x79e7a40 
#1  0x6c81c20 in
vector_builder<tree_node*,tree_vector_builder>::try_npatterns(unsigned
int)+0x2a0 ()
#2  0x6c821d0 in vector_builder<tree_node*,tree_vector_builder>::finalize()
   +0x390 ()
#3  0x59e9b70:0 in tree_vector_builder::build()+0x30 ()
#4  0x5a69240:0 in <unknown_procedure> ()
#5  0x5a8b6b0:0 in selftest::tree_c_tests()+0x7b0 ()
#6  0x642a510:0 in selftest::run_tests()+0x190 ()
#7  0x52e68e0:0 in toplev::run_self_tests()+0x60 ()
#8  0x52e8760:0 in toplev::main(int,char**)+0x1be0 ()
#9  0x64d4eb0:0 in main+0x70 ()
(gdb)
----------------------------------------

Thanks!
--peter


More information about the Gcc-bugs mailing list