]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/tree-ssa/pr87008.C
Make SRA less strict with memcpy performing MEM_REFs
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr87008.C
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 extern void dontcallthis();
5
6 struct A { long a, b; };
7 struct B : A {};
8 template<class T>void cp(T&a,T const&b){a=b;}
9 long f(B x){
10 B y; cp<A>(y,x);
11 B z; cp<A>(z,x);
12 if (y.a - z.a)
13 dontcallthis ();
14 return 0;
15 }
16
17 /* { dg-final { scan-tree-dump-not "dontcallthis" "optimized" } } */