public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/16306] New: restrict and copying pointers problem
@ 2004-07-01  0:01 dann at godzilla dot ics dot uci dot edu
  2005-04-21  5:06 ` [Bug tree-optimization/16306] [4.0/4.1 Regression] " mmitchel at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-07-01  0:01 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-10-01 14:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-16306-1008@http.gcc.gnu.org/bugzilla/>
2005-10-12 20:58 ` [Bug tree-optimization/16306] [4.0/4.1 Regression] restrict and copying pointers problem steven at gcc dot gnu dot org
2005-10-12 20:58 ` steven at gcc dot gnu dot org
2005-10-22  3:12 ` pinskia at gcc dot gnu dot org
2005-10-30 22:41 ` mmitchel at gcc dot gnu dot org
2006-03-11  3:20 ` [Bug tree-optimization/16306] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
2007-01-18  2:57 ` [Bug tree-optimization/16306] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
2007-01-21 21:48 ` pinskia at gcc dot gnu dot org
2007-02-14  9:34 ` mmitchel at gcc dot gnu dot org
2007-12-28 13:36 ` pinskia at gcc dot gnu dot org
2008-07-04 16:33 ` [Bug tree-optimization/16306] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-10-01 14:33 ` rguenth at gcc dot gnu dot org
2004-07-01  0:01 [Bug tree-optimization/16306] New: " dann at godzilla dot ics dot uci dot edu
2005-04-21  5:06 ` [Bug tree-optimization/16306] [4.0/4.1 Regression] " mmitchel at gcc dot gnu dot org
2005-07-08  1:45 ` mmitchel at gcc dot gnu dot org
2005-09-27 16:25 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).