This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15791] fold misses that two ADDR_EXPR of an arrary obvious not equal
- From: "rguenth at tat dot physik dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2005 14:53:28 -0000
- Subject: [Bug tree-optimization/15791] fold misses that two ADDR_EXPR of an arrary obvious not equal
- References: <20040603004359.15791.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-01-27 14:53 -------
Bootstrapping and testing completed successfully, but for the testcase
int g(void)
{
struct { int b[2]; } x;
return &x.b[0] == &x.b[1];
}
we have lowered the comparison to
<eq_expr 0x40148264
type <integer_type 0x40149510 int public SI
size <integer_cst 0x40141408 constant invariant 32>
unit size <integer_cst 0x40141198 constant invariant 4>
align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x401413c0
-2147483648> max <integer_cst 0x401413d8 2147483647>
pointer_to_this <pointer_type 0x401569b4>>
invariant
arg 0 <nop_expr 0x40146300
type <pointer_type 0x401569b4 type <integer_type 0x40149510 int>
public unsigned SI size <integer_cst 0x40141408 32> unit size
<integer_cst 0x40141198 4>
align 32 symtab 0 alias set -1>
invariant
arg 0 <addr_expr 0x40146280 type <pointer_type 0x401b521c>
invariant
arg 0 <component_ref 0x4014d078 type <array_type 0x401b5000>
arg 0 <var_decl 0x401b51b0 x> arg 1 <field_decl 0x401b506c b>>>>
arg 1 <plus_expr 0x40148240 type <pointer_type 0x401569b4>
invariant
arg 0 <nop_expr 0x40146340 type <pointer_type 0x401569b4>
invariant
arg 0 <addr_expr 0x40146320 type <pointer_type 0x401b521c>
invariant
arg 0 <component_ref 0x4014d0a0 type <array_type 0x401b5000>
arg 0 <var_decl 0x401b51b0 x> arg 1 <field_decl 0x401b506c b>>>>
arg 1 <integer_cst 0x40141d50 constant invariant 4>>>
and what confuses is the extra(?) nop_exprs - can I somehow avoid adding another
path for this case?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15791