This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/50191] Strange debug insn produced for TOC compiling 416.gamess with profile-generate


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50191

--- Comment #8 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-08-30 19:33:42 UTC ---
I built a cross-compiler on gcc10.fsffrance.org that exhibits the problem:

$ cd /home/wschmidt/src/416.gamess
$ /home/wschmidt/gcc/build/gcc-mainline-base/gcc/f951 chgpen.fppized.f -g -O3
-fprofile-generate -ffast-math -funroll-loops -mcpu=power7 -mtune=power7 -m64
-o chgpen.fppized.s -fdump-rtl-vartrack -quiet
$ sed -n '/^(note/,/^$/p' chgpen.fppized.f.214r.vartrack  | grep -i unspec
            (const:DI (unspec:DI [
                    ] UNSPEC_TOCREL))))
                        (const:DI (unspec:DI [
                                ] UNSPEC_TOCREL))) [23 S8 A8]) [0 MEM[base:
D.8938_616, offset: 0B]+0 S4 A32]))
            (const:DI (unspec:DI [
                    ] UNSPEC_TOCREL))))
            (const:DI (unspec:DI [
                    ] UNSPEC_TOCREL))))
            (const:DI (unspec:DI [
                    ] UNSPEC_TOCREL))))
                                    (high:DI (const:DI (unspec:DI [
                                                ] UNSPEC_TOCREL)))))
                            (const:DI (unspec:DI [
                                    ] UNSPEC_TOCREL)))
            (const:DI (unspec:DI [
                    ] UNSPEC_TOCREL))))
                    (high:DI (const:DI (unspec:DI [
                                ] UNSPEC_TOCREL)))))
            (const:DI (unspec:DI [
                    ] UNSPEC_TOCREL))))
                    (high:DI (const:DI (unspec:DI [
                                ] UNSPEC_TOCREL)))))
            (const:DI (unspec:DI [
                    ] UNSPEC_TOCREL))))

With this version of the compiler, the funky debug_insn looks like this after
179r.combine:

(debug_insn 9141 9147 9146 5 (var_location:DI D#142 (mem/u/c:DI (lo_sum:DI
(reg/f:DI 2232)
            (const:DI (unspec:DI [
                        (symbol_ref/u:DI ("*.LC8") [flags 0x2])
                    ] UNSPEC_TOCREL))) [23 S8 A8])) -1
     (nil))

In case you need to rebuild, the compiler was built with the following
configuration based on r178337:

$ /home/wschmidt/gcc/gcc-mainline-base/configure --target=powerpc64-linux
--host=x86_64-linux --build=x86_64-linux --enable-threads=posix --enable-shared
--enable-__cxa_atexit --enable-languages=c,c++,fortran,objc,obj-c++
--enable-checking=yes --with-gmp=/opt/cfarm/gmp --with-mpfr=/opt/cfarm/mpfr
--with-mpc=/opt/cfarm/mpc --with-libelf=/opt/cfarm/libelf-0.8.12
--prefix=/home/wschmidt/gcc/install/gcc-mainline-base --with-cpu=default64
--with-as=/home/wschmidt/binutils-cross/build/gas/as-new
--with-ld=/home/wschmidt/binutils-cross/build/ld/ld-new --enable-cross
--with-sysroot=/home/wschmidt/ppc-sysroot

(The make fails trying to build the target libraries, but that's of no
consequence for reproducing this problem.)

Please let me know if you have any trouble accessing the files; permissions
should be set properly but I might have missed something.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]