Bug 64375 - m32c ICE building newlib in calls.cL3638
Summary: m32c ICE building newlib in calls.cL3638
Status: RESOLVED DUPLICATE of bug 64546
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-22 15:12 UTC by Joel Sherrill
Modified: 2021-08-16 07:47 UTC (History)
1 user (show)

See Also:
Host:
Target: m32c
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed fopencookie.c from newlib (9.57 KB, application/x-bzip)
2014-12-22 15:12 UTC, Joel Sherrill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2014-12-22 15:12:35 UTC
Created attachment 34312 [details]
Preprocessed fopencookie.c from newlib

xgcc (GCC) 5.0.0 20141221 (experimental)

This appears to be completely independent of optimization. It fails at O[012s] if -mcpum32cm is included.

/users/joel/test-gcc/b-m32c-rtems4.11-gcc/./gcc/xgcc -B/users/joel/test-gcc/b-m32c-rtems4.11-gcc/./gcc/ -c -Os -mcpu=m32cm f.c

/users/joel/test-gcc/b-m32c-rtems4.11-gcc/./gcc/xgcc -B/users/joel/test-gcc/b-m32c-rtems4.11-gcc/./gcc/ -nostdinc -B/users/joel/test-gcc/b-m32c-rtems4.11-gcc/m32c-rtems4.11/m32cm/newlib/ -isystem /users/joel/test-gcc/b-m32c-rtems4.11-gcc/m32c-rtems4.11/m32cm/newlib/targ-include -isystem /users/joel/test-gcc/gcc/newlib/libc/include -B/users/joel/test-gcc/install-head/m32c-rtems4.11/bin/ -B/users/joel/test-gcc/install-head/m32c-rtems4.11/lib/ -isystem /users/joel/test-gcc/install-head/m32c-rtems4.11/include -isystem /users/joel/test-gcc/install-head/m32c-rtems4.11/sys-include  -mcpu=m32cm -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.2.0\" -DPACKAGE_STRING=\"newlib\ 2.2.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I../../../../../../gcc/newlib/libc/stdio -Os -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY -D_COMPILING_NEWLIB -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN -fno-builtin      -g -O2 -c -o lib_a-fopencookie.o `test -f 'fopencookie.c' || echo '../../../../../../gcc/newlib/libc/stdio/'`fopencookie.c
../../../../../../gcc/newlib/libc/stdio/fopencookie.c: In function 'fopencookie':
../../../../../../gcc/newlib/libc/stdio/fopencookie.c:260:10: internal compiler error: in expand_call, at calls.c:3638
   return _fopencookie_r (_REENT, cookie, mode, functions);
          ^
0x558859 expand_call(tree_node*, rtx_def*, int)
	../../gcc/gcc/calls.c:3638
0x64ac10 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
	../../gcc/gcc/expr.c:10474
0x656c2c store_expr_with_bounds(tree_node*, rtx_def*, int, bool, tree_node*)
	../../gcc/gcc/expr.c:5368
0x65e23e expand_assignment(tree_node*, tree_node*, bool)
	../../gcc/gcc/expr.c:5137
0x5655a6 expand_call_stmt
	../../gcc/gcc/cfgexpand.c:2345
0x5655a6 expand_gimple_stmt_1
	../../gcc/gcc/cfgexpand.c:3293
0x5655a6 expand_gimple_stmt
	../../gcc/gcc/cfgexpand.c:3447
0x56b651 expand_gimple_tailcall
	../../gcc/gcc/cfgexpand.c:3494
0x56b651 expand_gimple_basic_block
	../../gcc/gcc/cfgexpand.c:5257
0x56cdce execute
	../../gcc/gcc/cfgexpand.c:5889
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.
make: *** [lib_a-fopencookie.o] Error 1
Comment 1 Yaakov Selkowitz 2015-07-28 22:27:25 UTC
Ditto for 5.2.0 m32c-elf at calls.c:3681.
Comment 2 Yaakov Selkowitz 2016-05-15 22:06:11 UTC
Still not working with 6.1.0 m32c-elf at calls.c:3679.
Comment 3 Andrew Pinski 2021-08-16 07:47:24 UTC
Dup of bug 64546.

*** This bug has been marked as a duplicate of bug 64546 ***