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

            Bug ID: 63882
           Summary: internal compiler error: in int_mode_for_mode, at
                    stor-layout.c:395
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aiencai at 126 dot com

Created attachment 33981
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33981&action=edit
preprocessed file

I  got this error while compling gcc-4.9.2 on my mipsel-linux platform.
../../.././libgcc/libgcc2.c: In function '__mulvdi3':
../../.././libgcc/libgcc2.c:395:1: warning: 'vn_top.0' may be used
uninitialized in this function [-Wmaybe-uninitialized]
 }
 ^
../../.././libgcc/libgcc2.c:303:12: internal compiler error: in
int_mode_for_mode, at stor-layout.c:395
      w1.ll -= vv.ll;
            ^
0x12050d353 int_mode_for_mode(machine_mode)
    ../.././gcc/stor-layout.c:647
0x120299e43 emit_move_via_integer
    ../.././gcc/vec.h:252
0x12029a043 emit_move_insn_1(rtx_def*, rtx_def*)
    ../.././gcc/vec.h:252
0x12029a56f emit_move_insn(rtx_def*, rtx_def*)
    ../.././gcc/vec.h:252
0x1202a382b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
    ../.././gcc/vec.h:252
0x1202a4b97 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
    ../.././gcc/vec.h:252
0x1202a6763 expand_expr
    ../.././gcc/vec.h:252
0x1202a6763 expand_operands
    ../.././gcc/expr.c:7545
0x1202aab2b expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
    ../.././gcc/vec.h:252
0x1202a22b3 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
    ../.././gcc/vec.h:252
0x1202a4b97 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
    ../.././gcc/vec.h:252
0x12029fc7b expand_normal
    ../.././gcc/vec.h:252
0x12029fc7b store_field
    ../.././gcc/expr.c:6561
0x1202a917f expand_assignment(tree_node*, tree_node*, bool)
    ../.././gcc/vec.h:252
0x1201a9fa7 expand_gimple_stmt_1
    ../.././gcc/cfgexpand.c:4300
0x1201a9fa7 expand_gimple_stmt
    ../.././gcc/cfgexpand.c:3322
0x1201ab77b expand_gimple_basic_block
    ../.././gcc/cfgexpand.c:4300
0x1201b0db7 gimple_expand_cfg
    ../.././gcc/cfgexpand.c:4300
0x1201b0db7 execute
    ../.././gcc/cfgexpand.c:5961
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 complete command line that triggers the error is 
/root/gcc-4.9.2/host-mips64el-neokylin-linux/gcc/xgcc -save-temps
-B/root/gcc-4.9.2/host-mips64el-neokylin-linux/gcc/
-B/usr/mips64el-neokylin-linux/bin/ -B/usr/mips64el-neokylin-linux/lib/
-isystem /usr/mips64el-neokylin-linux/include -isystem
/usr/mips64el-neokylin-linux/sys-include    -g -O2 -minterlink-mips16 -mabi=32
-O2  -g -O2 -minterlink-mips16 -DIN_GCC    -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  
-fPIC -I. -I. -I../../../host-mips64el-neokylin-linux/gcc -I../../.././libgcc
-I../../.././libgcc/. -I../../.././libgcc/../gcc -I../../.././libgcc/../include
 -DHAVE_CC_TLS  -o _mulvdi3.o -MT _mulvdi3.o -MD -MP -MF _mulvdi3.dep
-DL_mulvdi3 -c ../../.././libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS

These are my configuration options
configured by ./configure, generated by GNU Autoconf 2.64,
  with options " '--prefix=/usr' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--disable-bootstrap' '--enable-shared'
'--enable-threads=posix' '--enable-checking=release' '--enable-multilib'
'--with-system-zlib' '--enable-__cxa_atexit' '--disable-libunwind-exceptions'
'--enable-gnu-unique-object' '--enable-linker-build-id' '--enable-plugin'
'--disable-initfini-array' '--disable-libgcj' '--without-ppl' '--without-cloog'
'--with-mpc=/root/gcc-4.9.2/mpc-install' '--with-abi=64'
'--build=mips64el-neokylin-linux' 'build_alias=mips64el-neokylin-linux'
'--enable-languages=c,c++,lto'"

These are my configuration options for mpc-1.0.2
configured by ../configure, generated by GNU Autoconf 2.69,
  with options "'--disable-shared' 'CFLAGS=-O2 -g' 'CXXFLAGS=-O2 -g'
'--build=mips64el-neokylin-linux' '--prefix=/root/gcc-4.9.2/mpc-install'
'build_alias=mips64el-neokylin-linux'"


I don't know if there is a link between this and bug57108 but I get some points
of the error, hopefully it's helpful.

1.I got the same error message in all 32、n32、64 abis on mips.
2.Everything work just fine when I add '-O0‘ at the end of command to
optimization prevention.
3.I don't know if there is relationship about the mpc, but everything work fine
when I use the mpc-0.8.1 installed in my system.

Reply via email to