https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83185
Bug ID: 83185
Summary: ICE with -fsanitize=address in
build_simple_mem_ref_loc, at tree.c:4696
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
With option -fsanitize=address and -Os|1+ :
$ cat z1.c
#include <stdarg.h>
void
f (int i, ...)
{
va_list aps[g()];
va_start (aps[4], i);
}
$ gcc-8-20171126 -c z1.c -O2 -fsanitize=address
z1.c: In function 'f':
z1.c:6:15: warning: implicit declaration of function 'g'
[-Wimplicit-function-declaration]
va_list aps[g()];
^
during RTL pass: expand
In file included from z1.c:1:
z1.c:7:3: internal compiler error: in build_simple_mem_ref_loc, at tree.c:4696
va_start (aps[4], i);
^~~~~~~~
0xd037df build_simple_mem_ref_loc(unsigned int, tree_node*)
../../gcc/tree.c:4696
0xd78a55 ix86_va_start
../../gcc/config/i386/i386.c:9803
0x72f443 expand_builtin_va_start
../../gcc/builtins.c:4819
0x72f443 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
../../gcc/builtins.c:7115
0x8352d8 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.c:10851
0x749f8c expand_expr
../../gcc/expr.h:276
0x749f8c expand_call_stmt
../../gcc/cfgexpand.c:2673
0x749f8c expand_gimple_stmt_1
../../gcc/cfgexpand.c:3607
0x749f8c expand_gimple_stmt
../../gcc/cfgexpand.c:3773
0x74b0d3 expand_gimple_basic_block
../../gcc/cfgexpand.c:5772
0x7503d6 execute
../../gcc/cfgexpand.c:6373