]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/tree-ssa/pr106077.C
Fix wrong code issues with ipa-sra
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr106077.C
1 // { dg-do compile }
2 // { dg-options "-O2 -fno-ipa-cp -fdump-tree-optimized" }
3 short e,f;
4 static __attribute__ ((noinline))
5 int a(int *b)
6 {
7 return *b;
8 }
9 static __attribute__ ((noinline))
10 __attribute__ ((optimize("non-call-exceptions")))
11 int wrap(int *b,int e, int f)
12 {
13 e/=f;
14 return a(b)+e;
15 }
16
17 int
18 t()
19 {
20 return wrap(0,1,0);
21 }
22 // { dg-final { scan-tree-dump-not "builtin_trap" "optimized" } }