This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79085] ICE with placement new to unaligned location
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Mar 2017 23:33:55 +0000
- Subject: [Bug c++/79085] ICE with placement new to unaligned location
- Auto-submitted: auto-generated
- References: <bug-79085-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79085
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
The ICE is still present on this week's trunk. The following is a reduced test
case:
$ cat y.C && arm-eabi-gcc -Os -Wall -c y.C
void* operator new (__SIZE_TYPE__, void *p) { return p; }
struct M
{
~M (void);
int i;
};
M create();
static char buf [sizeof (M)];
M* fn (void)
{
return new (buf) M (create ());
}
y.C: In function ‘M* fn()’:
y.C:16:32: internal compiler error: in assign_temp, at function.c:968
return new (buf) M (create ());
^
0xe17a50 assign_temp(tree_node*, int, int)
/src/gcc/trunk/gcc/function.c:968
0xbd4fa4 expand_call(tree_node*, rtx_def*, int)
/src/gcc/trunk/gcc/calls.c:3136
0xdac857 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/src/gcc/trunk/gcc/expr.c:10825
0xd9fa31 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
/src/gcc/trunk/gcc/expr.c:8072
0xd94de7 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
/src/gcc/trunk/gcc/expr.c:5552
0xd9397f expand_assignment(tree_node*, tree_node*, bool)
/src/gcc/trunk/gcc/expr.c:5321
0xbf0376 expand_call_stmt
/src/gcc/trunk/gcc/cfgexpand.c:2656
0xbf40f7 expand_gimple_stmt_1
/src/gcc/trunk/gcc/cfgexpand.c:3571
0xbf4863 expand_gimple_stmt
/src/gcc/trunk/gcc/cfgexpand.c:3737
0xbfd213 expand_gimple_basic_block
/src/gcc/trunk/gcc/cfgexpand.c:5744
0xbfea84 execute
/src/gcc/trunk/gcc/cfgexpand.c:6357
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.