xref: /aosp_15_r20/external/clang/test/CodeGen/2002-03-14-BrokenSSA.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -emit-llvm %s  -o /dev/null
2*67e74705SXin Li 
3*67e74705SXin Li /* This code used to break GCC's SSA computation code.  It would create
4*67e74705SXin Li    uses of B & C that are not dominated by their definitions.  See:
5*67e74705SXin Li    http://gcc.gnu.org/ml/gcc/2002-03/msg00697.html
6*67e74705SXin Li  */
7*67e74705SXin Li int bar();
foo()8*67e74705SXin Li int foo()
9*67e74705SXin Li {
10*67e74705SXin Li   int a,b,c;
11*67e74705SXin Li 
12*67e74705SXin Li   a = b + c;
13*67e74705SXin Li   b = bar();
14*67e74705SXin Li   c = bar();
15*67e74705SXin Li   return a + b + c;
16*67e74705SXin Li }
17*67e74705SXin Li 
18