public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/58958] New: [4.9 Regression] Wrong aliasing info for variable index
@ 2013-11-01 10:01 glisse at gcc dot gnu.org
  2013-11-04 14:29 ` [Bug tree-optimization/58958] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-11-01 10:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58958

            Bug ID: 58958
           Summary: [4.9 Regression] Wrong aliasing info for variable
                    index
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org

double a[10];
bool f(int n){
  a[3]=42;
  __builtin_memset(&a[n],3,sizeof(double));
  return a[3]==42;
}

is optimized to:

bool f(int) (int n)
{
  double * _4;

  <bb 2>:
  a[3] = 4.2e+1;
  _4 = &a[n_3(D)];
  __builtin_memset (_4, 3, 8);
  return 1;

}

This is the issue described here:
http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02558.html

ao_ref_init_from_ptr_and_size makes an unsafe use of get_ref_base_and_extent.
Maybe relying on get_addr_base_and_unit_offset would be better?

The testcase is a regression, although the issue preexisted.


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

end of thread, other threads:[~2013-11-05 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-01 10:01 [Bug tree-optimization/58958] New: [4.9 Regression] Wrong aliasing info for variable index glisse at gcc dot gnu.org
2013-11-04 14:29 ` [Bug tree-optimization/58958] " rguenth at gcc dot gnu.org
2013-11-05 13:03 ` glisse at gcc dot gnu.org
2013-11-05 13:04 ` glisse at gcc dot gnu.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).