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

            Bug ID: 61916
           Summary: Internal compiler error in
                    symtab_nonoverwritable_alias with -O2
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: timothygu99 at gmail dot com

Created attachment 33186
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33186&action=edit
Preprocessed source that allows to reproduce the bug

Hi,

I am on x86_64-unknown-linux-gnu cross-compiling to i686-pc-mingw32 with
mingwrt 3.20-2 and w32api 3.17. The complete configure flags used to compile
GCC is:

        --target='i686-pc-mingw32' \
        --build='x86_64-mingw32-unknown' \
        --prefix='my-dir' \
        --libdir='my-dir/lib' \
        --enable-languages='c,c++,objc,fortran' \
        --enable-version-specific-runtime-libs \
        --with-gcc \
        --with-gnu-ld \
        --with-gnu-as \
        --disable-nls \
        --disable-multilib \
        --without-x \
        --disable-win32-registry \
        --enable-threads=win32 \
        --disable-libgomp \
        --disable-libmudflap \
        --with-cloog='my-dir' \
        --with-gmp='my-dir' \
        --with-isl='my-dir' \
        --with-mpc='my-dir' \
        --with-mpfr='my-dir' \
        --with-as='my-dir/bin/i686-pc-mingw32-as' \
        --with-ld='my-dir/bin/i686-pc-mingw32-ld' \
        --with-nm='my-dir/bin/i686-pc-mingw32-nm'

I am trying to compile imlib2 1.4.6; however when compiling src/lib/api.c gcc
errors out:

$ i686-pc-mingw32-gcc -DHAVE_CONFIG_H -DPACKAGE_LIB_DIR=\"my-dir/lib\" [a bunch
of -I's] -save-temps -O2 -c api.c -o .libs/api.o
api.c:5411:1: internal compiler error: in symtab_nonoverwritable_alias, at
symtab.c:1234
 }
 ^
0x659ed4 symtab_nonoverwritable_alias(symtab_node*)
   
/home/timothy_gu/mxe/tmp-gcc-i686-pc-mingw32.shared/gcc-4.9.0/gcc/symtab.c:1234
0x79e161 function_and_variable_visibility
   
/home/timothy_gu/mxe/tmp-gcc-i686-pc-mingw32.shared/gcc-4.9.0/gcc/ipa.c:1085
0x79e906 whole_program_function_and_variable_visibility
   
/home/timothy_gu/mxe/tmp-gcc-i686-pc-mingw32.shared/gcc-4.9.0/gcc/ipa.c:1290
0x79e906 execute
   
/home/timothy_gu/mxe/tmp-gcc-i686-pc-mingw32.shared/gcc-4.9.0/gcc/ipa.c:1334
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

(The exact compilation command provided by the project also contains lots of
-W's and some -f's. I have confirmed that removing them still allows to
reproduce this bug.)

This issue is only reproducible with -O2 or higher. -O1 works fine.

The preprocessed source is attached.

Reply via email to