[Bug tree-optimization/16306] New: restrict and copying pointers problem
dann at godzilla dot ics dot uci dot edu
gcc-bugzilla@gcc.gnu.org
Thu Jul 1 00:01:00 GMT 2004
The current mainline does not optimize away the "link_error" call for this function:
void bar00 (int *a1, int *a2)
{
int * __restrict__ cpy_res1 = a1;
int * __restrict__ cpy_res2 = a2;
cpy_res1[0] = 1;
cpy_res2[0] = 1;
if (cpy_res1[0] != 1)
link_error ();
}
gcc-3.0 optimizes it.
What happens is that the dom1 pass replaces the uses of cpy_res[12] (which are
restricted pointers) with a[12] (which are not), so the RTL optimizers cannot
know that the "if" can be optimized away.
This issue might be sort of related to PR14187.
PR 14187
--
Summary: restrict and copying pointers problem
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16306
More information about the Gcc-bugs
mailing list