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
PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-ssa
/
forwprop-2.c
blob
6c43f95d1c13acee09e1b9f22ba7351c10abb516
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-forwprop1" } */
3
4
/* We may not optimize this to b->t[i] = 1. */
5
6
struct
a
7
{
8
char
t
[
10
];
9
};
10
11
struct
a
*
b
;
12
13
void
f
(
__SIZE_TYPE__ i
)
14
{
15
char
*
c
=
b
->
t
;
16
c
[
i
] =
1
;
17
}
18
19
/* { dg-final { scan-tree-dump-times "\\\[\[^\n\r\]*\\\] = 1;" 0 "forwprop1" } } */