repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
tree-ssa
/
pr31146.C
blob
1a77ea963d0d509364d01c1d54cc8eda5f629a3c
1
/* { dg-do compile } */
2
/* { dg-options "-O -fdump-tree-forwprop" } */
3
4
/* We should be able to optimize this to i[j] = 1 during
5
early optimizations. */
6
7
int i[5];
8
void foo (int j)
9
{
10
void *p = &i[j];
11
int *q = (int *)p;
12
*q = 1;
13
}
14
15
/* { dg-final { scan-tree-dump "MEM\\\[.*&i\\\]\\\[j.*\\\] =.* 1;" "forwprop1" } } */