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

            Bug ID: 70614
           Summary: GCC gets stuck with -O
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kazunori.ueda.ku at gmail dot com
  Target Milestone: ---

Created attachment 38231
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38231&action=edit
obtained by "gcc -c -save-temps -v wave.c"  (without -O)

Compilation of the attached (machine-generated) program gets stuck with -On
(n>0)
(i.e., without reporting the next "COLLECT_GCC_OPTIONS=" message).  Happens
also with -m32.  Does not happen with -O0.  The same problem happened in
several (but not all) previous versions of gcc (Linux and Cygwin).  
(FYI, compilation of all other machine-generated programs from the same
software we have tested works fine with -O.)  Thanks for your help.

$ gcc -c -O -v wave.i
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.2.1-22ubuntu2'
--with-bugurl=file:///usr/share/doc/\
gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++
--prefix=/usr --program-suffix=-5 --en\
able-shared --enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdi\
r=/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-vtable-verify --enable-libmpx --enable-plugin -\
-with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/ja\
va-1.5.0-gcj-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-d\
ir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64
--with-ecj-jar=/usr/share/java/eclipse-ec\
j.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m\
32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-l\
inux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2)
COLLECT_GCC_OPTIONS='-c' '-O' '-v' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1 -fpreprocessed wave.i -quiet -dumpbase
wave.i -mtune=generic -march=x86-64 -aux\
base wave -O -version -fstack-protector-strong -Wformat -Wformat-security -o
/tmp/ccyZdX3r.s
GNU C11 (Ubuntu 5.2.1-22ubuntu2) version 5.2.1 20151010 (x86_64-linux-gnu)
        compiled by GNU C version 5.2.1 20151010, GMP version 6.0.0, MPFR
version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C11 (Ubuntu 5.2.1-22ubuntu2) version 5.2.1 20151010 (x86_64-linux-gnu)
        compiled by GNU C version 5.2.1 20151010, GMP version 6.0.0, MPFR
version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: ae1f57641df2bca5e5adf4e90874d7ef

(then enters an infinite loop.)

Reply via email to