This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38505] [4.4 Regression] Revision 142061 caused ICE on __builtin_memcpy
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Dec 2008 20:19:25 -0000
- Subject: [Bug middle-end/38505] [4.4 Regression] Revision 142061 caused ICE on __builtin_memcpy
- References: <bug-38505-15329@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from jakub at gcc dot gnu dot org 2008-12-12 20:19 -------
I'd say the bug is in may_propagate_address_into_dereference, called with addr:
<addr_expr 0x7ffff7ffb780
type <pointer_type 0x7ffff320f600
type <integer_type 0x7ffff31f8480 short unsigned int sizes-gimplified
public unsigned HI
size <integer_cst 0x7ffff31e7960 constant 16>
unit size <integer_cst 0x7ffff31e7990 constant 2>
align 16 symtab 0 alias set -1 canonical type 0x7ffff31f8480
precision 16 min <integer_cst 0x7ffff31e79c0 0> max <integer_cst 0x7ffff31e7930
65535>
pointer_to_this <pointer_type 0x7ffff320f600>>
unsigned DI
size <integer_cst 0x7ffff31e7b70 constant 64>
unit size <integer_cst 0x7ffff31e7ba0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff320f600>
constant
arg 0 <var_decl 0x7ffff32bd960 d
type <array_type 0x7ffff30f9c00 type <integer_type 0x7ffff31f8480 short
unsigned int>
BLK
align 16 symtab 0 alias set -1 canonical type 0x7ffff30f9c00
pointer_to_this <pointer_type 0x7ffff31123c0>>
addressable used public external common BLK file pr38505.c line 7 col
23
align 16
chain <function_decl 0x7ffff30f8f00 foo type <function_type
0x7ffff3210000>
public static QI file pr38505.c line 10 col 1 align 8 initial
<block 0x7ffff310f2a0> result <result_decl 0x7ffff3110000 D.1597>
(mem:QI (symbol_ref:DI ("foo") [flags 0x3] <function_decl
0x7ffff30f8f00 foo>) [0 S1 A8])
saved-insns 0x7ffff32bda00>>>
and deref:
<indirect_ref 0x7ffff7ffb540
type <array_type 0x7ffff30f9a80
type <integer_type 0x7ffff31f8480 short unsigned int sizes-gimplified
public unsigned HI
size <integer_cst 0x7ffff31e7960 constant 16>
unit size <integer_cst 0x7ffff31e7990 constant 2>
align 16 symtab 0 alias set -1 canonical type 0x7ffff31f8480
precision 16 min <integer_cst 0x7ffff31e79c0 0> max <integer_cst 0x7ffff31e7930
65535>
pointer_to_this <pointer_type 0x7ffff320f600>>
sizes-gimplified BLK
size <integer_cst 0x7ffff310d9c0 constant 320>
unit size <integer_cst 0x7ffff310db70 constant 40>
align 16 symtab 0 alias set 2 canonical type 0x7ffff30f9a80
domain <integer_type 0x7ffff30f99c0 type <integer_type 0x7ffff31f8000
long unsigned int>
sizes-gimplified DI
size <integer_cst 0x7ffff31e7b70 constant 64>
unit size <integer_cst 0x7ffff31e7ba0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff30f99c0
precision 64 min <integer_cst 0x7ffff31e7720 0> max <integer_cst 0x7ffff310dab0
19>>
pointer_to_this <pointer_type 0x7ffff3112240>>
arg 0 <ssa_name 0x7ffff31e5d20
type <pointer_type 0x7ffff3112240 type <array_type 0x7ffff30f9a80>
static unsigned DI size <integer_cst 0x7ffff31e7b70 64> unit size
<integer_cst 0x7ffff31e7ba0 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff3112240>
visited var <var_decl 0x7ffff32bdbe0 d.0>def_stmt d.0_1 = (short
unsigned int[20] * {ref-all}) &d;
version 1>>
It allows propagating of an incomplete type var, which it certainly shouldn't
allow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38505