Bug 64546 - m32c ICE at calls.c:3638 compiling newlib
Summary: m32c ICE at calls.c:3638 compiling newlib
Status: NEW
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:
: 64375 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-08 23:39 UTC by Joel Sherrill
Modified: 2021-08-23 00:31 UTC (History)
2 users (show)

See Also:
Host:
Target: m32c-rtems
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-08-09 00:00:00


Attachments
Preprocessed newlib source which produces the ICE (9.56 KB, application/x-bzip)
2015-01-08 23:55 UTC, Joel Sherrill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2015-01-08 23:39:38 UTC
xgcc (GCC) 5.0.0 20150107 (experimental)

This fails at -O[012S]. The flag -mcpu=m32cm appears to be the trigger.

/home2/joel/build/b-m32c-gcc/./gcc/xgcc -B/home2/joel/build/b-m32c-gcc/./gcc/  -c -g -O0 -mcpu=m32cm m32c-fopencookie.c 
/users/joel/test-gcc/gcc/newlib/libc/stdio/fopencookie.c: In function 'fopencookie':
/users/joel/test-gcc/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);
          ^
0x558b39 expand_call(tree_node*, rtx_def*, int)
	/users/joel/test-gcc/gcc/gcc/calls.c:3638
0x64afa0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
	/users/joel/test-gcc/gcc/gcc/expr.c:10474
0x656fbc store_expr_with_bounds(tree_node*, rtx_def*, int, bool, tree_node*)
	/users/joel/test-gcc/gcc/gcc/expr.c:5368
0x65e5ce expand_assignment(tree_node*, tree_node*, bool)
	/users/joel/test-gcc/gcc/gcc/expr.c:5137
0x565886 expand_call_stmt
	/users/joel/test-gcc/gcc/gcc/cfgexpand.c:2345
0x565886 expand_gimple_stmt_1
	/users/joel/test-gcc/gcc/gcc/cfgexpand.c:3293
0x565886 expand_gimple_stmt
	/users/joel/test-gcc/gcc/gcc/cfgexpand.c:3447
0x56b6e4 expand_gimple_basic_block
	/users/joel/test-gcc/gcc/gcc/cfgexpand.c:5280
0x56d0ae execute
	/users/joel/test-gcc/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.
Comment 1 Joel Sherrill 2015-01-08 23:55:24 UTC
Created attachment 34409 [details]
Preprocessed newlib source which produces the ICE

This code compiles with 4.8.3.
Comment 2 Martin Liška 2017-08-09 19:32:52 UTC
Confirmed, started in between 4.9 and 5.
Comment 3 Andrew Pinski 2021-08-16 07:47:24 UTC
*** Bug 64375 has been marked as a duplicate of this bug. ***