This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/80162] New: ICE on invalid code (address of register variable)
- From: "ienkovich at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Mar 2017 19:52:39 +0000
- Subject: [Bug middle-end/80162] New: ICE on invalid code (address of register variable)
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80162
Bug ID: 80162
Summary: ICE on invalid code (address of register variable)
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: ienkovich at gcc dot gnu.org
Target Milestone: ---
Looking at PR79990 I found that we can ICE on register variable usage even when
no CHKP is used.
Here is a possible testcase:
typedef int v8 __attribute__ ((vector_size(8)));
struct U {
v8 a;
v8 b;
};
register struct U u asm ("xmm0");
int *
foo (int i)
{
return &u.a[i];
}
$ gcc-build/bin/gcc pr79990-2.c -S
pr79990-2.c:8:19: warning: call-clobbered register used for global register
variable
register struct U u asm ("xmm0");
^
pr79990-2.c: In function ‘foo’:
pr79990-2.c:13:10: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:7790
return &u.a[i];
^~~~~~~
0xab00d2 expand_expr_addr_expr_1
../../gcc/gcc/expr.c:7790
0xab04d9 expand_expr_addr_expr_1
../../gcc/gcc/expr.c:7828
0xab0984 expand_expr_addr_expr
../../gcc/gcc/expr.c:7904
0xabe143 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/gcc/expr.c:11047
0xab0df5 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
../../gcc/gcc/expr.c:8072
0xaa7ccd store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
../../gcc/gcc/expr.c:5552
0xaa6616 expand_assignment(tree_node*, tree_node*, bool)
../../gcc/gcc/expr.c:5321
0x946a94 expand_gimple_stmt_1
../../gcc/gcc/cfgexpand.c:3641
0x946e9c expand_gimple_stmt
../../gcc/gcc/cfgexpand.c:3737
0x94e94d expand_gimple_basic_block
../../gcc/gcc/cfgexpand.c:5744
0x9503ff execute
../../gcc/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.