]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/forwprop-10.c
re PR middle-end/42834 (memcpy folding overeager)
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / forwprop-10.c
CommitLineData
4fedf870 1/* { dg-do compile } */
70f34814 2/* { dg-options "-O -fdump-tree-fre-details" } */
4fedf870
RG
3
4int b;
5unsigned a;
6
7static inline int *g(void)
8{
9 a = 1;
10 return (int*)&a;
11}
12void test2(void)
13{
14 b = *g();
15}
16
17/* The indirect load should be replaced by a load from a and a
70f34814
RG
18 conversion to int. FRE should then be able to replace
19 the rhs of the store to b by 1. */
4fedf870 20
70f34814
RG
21/* { dg-final { scan-tree-dump "Replaced\[^\\n\]*with 1" "fre" } } */
22/* { dg-final { cleanup-tree-dump "fre" } } */