https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67742

            Bug ID: 67742
           Summary: 3rd-level restrict ignored
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Consider test-case test.c:
...
struct s
{
  int *__restrict *__restrict pp1;
  int *__restrict *__restrict pp2;
};

void
f (struct s *__restrict sp)
{
  **(sp->pp1) = 1;
  **(sp->pp2) = 2;
}
...

We current generate at ealias:
...
f (struct s * restrict spD.1758)
{
  intD.6 * restrict * _3;
  intD.6 * _4;
  intD.6 * restrict * _6;
  intD.6 * _7;

  # VUSE <.MEM_1(D)>
  # PT = { D.1768 } (nonlocal)
  _3 = MEM[(struct s *)sp_2(D) clique 1 base 1].pp1D.1756;

  # VUSE <.MEM_1(D)>
  # PT = nonlocal escaped
  _4 = MEM[(intD.6 * restrict *)_3 clique 1 base 2];

  # .MEM_5 = VDEF <.MEM_1(D)>
  *_4 = 1;

  # VUSE <.MEM_5>
  # PT = { D.1769 } (nonlocal)
  _6 = MEM[(struct s *)sp_2(D) clique 1 base 1].pp2D.1757;

  # VUSE <.MEM_5>
  # PT = nonlocal escaped
  _7 = MEM[(intD.6 * restrict *)_6 clique 1 base 3];

  # .MEM_8 = VDEF <.MEM_5>
  *_7 = 2;
...

The two stores are missing clique/base annotation.

Reply via email to