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

            Bug ID: 87180
           Summary: Pointer to member function comparison fails on
                    hppa-linux-gnu
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mattias.ellert at physics dot uu.se
  Target Milestone: ---
              Host: hppa-linux-gnu
            Target: hppa-linux-gnu
             Build: hppa-linux-gnu

Created attachment 44643
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44643&action=edit
Test case illustrating the problem.

The attached tarball contains a reduced test case for a compilation failure
that occurs in a package I maintain for Debian Linux. The package compiles
without problem on all Debian architectures except hppa.

The issue only happens when linking using a shared library. If the test case is
linked statically the issue does not appear.

On all architectures except hppa the output of the test case is the following:

$ make
g++ -O2 -g -c -o main.o main.cpp
g++ -O2 -g -fPIC -c -o S.o S.cpp
g++ -shared -o libS.so S.o
g++ -o main main.o -L. -lS
g++ -o altmain main.o S.o
-- Running using shared library
LD_LIBRARY_PATH=. ./main
OK
-- Running using static build
./altmain
OK

On hppa the output is as follows:

$ make
g++ -O2 -g -c -o main.o main.cpp
g++ -O2 -g -fPIC -c -o S.o S.cpp
g++ -shared -o libS.so S.o
g++ -o main main.o -L. -lS
g++ -o altmain main.o S.o
-- Running using shared library
LD_LIBRARY_PATH=. ./main
not OK
-- Running using static build
./altmain
OK

Details about host and compiler:

$ uname -a
Linux panama 4.17.0-2-parisc64-smp #1 SMP Debian 4.17.14-1 (2018-08-13)
parisc64 GNU/Linux

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/hppa-linux-gnu/8/lto-wrapper
Target: hppa-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.2.0-4'
--with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8
--program-prefix=hppa-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libssp
--disable-libitm --disable-libsanitizer --disable-libquadmath
--disable-libquadmath-support --enable-plugin --with-system-zlib
--disable-libphobos --enable-objc-gc=auto --enable-multiarch --disable-werror
--disable-libstdcxx-pch --enable-checking=release --build=hppa-linux-gnu
--host=hppa-linux-gnu --target=hppa-linux-gnu
Thread model: posix
gcc version 8.2.0 (Debian 8.2.0-4)

Reply via email to