mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C++: Add tests for designated initializers with repetitions.
This commit is contained in:
@@ -7,6 +7,9 @@ duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
ambiguousSuccessors
|
||||
| ssa.c:3:14:3:16 | Uninitialized: definition of foo | Instruction 'Uninitialized: definition of foo' has 2 successors of kind 'Goto' in function '$@'. | ssa.c:2:6:2:22 | void named_designators() | void named_designators() |
|
||||
| ssa.c:7:13:7:37 | PointerAdd: {...} | Instruction 'PointerAdd: {...}' has 2 successors of kind 'Goto' in function '$@'. | ssa.c:6:6:6:25 | void repeated_designators() | void repeated_designators() |
|
||||
| ssa.cpp:418:16:418:46 | PointerAdd: {...} | Instruction 'PointerAdd: {...}' has 2 successors of kind 'Goto' in function '$@'. | ssa.cpp:417:6:417:29 | void nested_array_designators() | void nested_array_designators() |
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
memoryOperandDefinitionIsUnmodeled
|
||||
|
||||
@@ -7,6 +7,9 @@ duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
ambiguousSuccessors
|
||||
| ssa.c:3:14:3:16 | Uninitialized: definition of foo | Instruction 'Uninitialized: definition of foo' has 2 successors of kind 'Goto' in function '$@'. | ssa.c:2:6:2:22 | void named_designators() | void named_designators() |
|
||||
| ssa.c:7:13:7:37 | PointerAdd: {...} | Instruction 'PointerAdd: {...}' has 2 successors of kind 'Goto' in function '$@'. | ssa.c:6:6:6:25 | void repeated_designators() | void repeated_designators() |
|
||||
| ssa.cpp:418:16:418:46 | PointerAdd: {...} | Instruction 'PointerAdd: {...}' has 2 successors of kind 'Goto' in function '$@'. | ssa.cpp:417:6:417:29 | void nested_array_designators() | void nested_array_designators() |
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
memoryOperandDefinitionIsUnmodeled
|
||||
|
||||
@@ -1,3 +1,78 @@
|
||||
ssa.c:
|
||||
# 2| void named_designators()
|
||||
# 2| Block 0
|
||||
# 2| v2_1(void) = EnterFunction :
|
||||
# 2| m2_2(unknown) = AliasedDefinition :
|
||||
# 2| m2_3(unknown) = InitializeNonLocal :
|
||||
# 2| m2_4(unknown) = Chi : total:m2_2, partial:m2_3
|
||||
# 3| r3_1(glval<Foo>) = VariableAddress[foo] :
|
||||
# 3| m3_2(Foo) = Uninitialized[foo] : &:r3_1
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 3| Block 1
|
||||
# 3| r3_3(glval<int[2]>) = FieldAddress[x] : r3_1
|
||||
# 3| r3_5(int) = Constant[0] :
|
||||
# 3| r3_7(glval<int>) = PointerAdd[4] : r3_3, r3_5
|
||||
# 3| r3_9(int) = Constant[1234] :
|
||||
# 3| m3_11(int) = Store[?] : &:r3_7, r3_9
|
||||
# 3| m3_13(Foo) = Chi : total:m3_2, partial:m3_11
|
||||
# 3| r3_15(int) = Constant[1] :
|
||||
# 3| r3_17(glval<int>) = PointerAdd[4] : r3_3, r3_15
|
||||
# 3| r3_19(int) = Constant[0] :
|
||||
# 3| m3_21(int) = Store[?] : &:r3_17, r3_19
|
||||
# 3| m3_23(Foo) = Chi : total:m3_13, partial:m3_21
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 3| Block 1
|
||||
# 3| r3_3(glval<int[2]>) = FieldAddress[x] : r3_1
|
||||
# 3| r3_5(int) = Constant[0] :
|
||||
# 3| r3_7(glval<int>) = PointerAdd[4] : r3_3, r3_5
|
||||
# 3| r3_9(int) = Constant[0] :
|
||||
# 3| m3_11(int) = Store[?] : &:r3_7, r3_9
|
||||
# 3| m3_13(Foo) = Chi : total:m3_2, partial:m3_11
|
||||
# 3| r3_15(int) = Constant[1] :
|
||||
# 3| r3_17(glval<int>) = PointerAdd[4] : r3_3, r3_15
|
||||
# 3| r3_19(int) = Constant[5678] :
|
||||
# 3| m3_21(int) = Store[?] : &:r3_17, r3_19
|
||||
# 3| m3_23(Foo) = Chi : total:m3_13, partial:m3_21
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 4| Block 3
|
||||
# 4| v4_1(void) = NoOp :
|
||||
# 2| v2_5(void) = ReturnVoid :
|
||||
# 2| v2_6(void) = AliasedUse : m2_3
|
||||
# 2| v2_7(void) = ExitFunction :
|
||||
|
||||
# 6| void repeated_designators()
|
||||
# 6| Block 0
|
||||
# 6| v6_1(void) = EnterFunction :
|
||||
# 6| m6_2(unknown) = AliasedDefinition :
|
||||
# 6| m6_3(unknown) = InitializeNonLocal :
|
||||
# 6| m6_4(unknown) = Chi : total:m6_2, partial:m6_3
|
||||
# 7| r7_1(glval<int[1]>) = VariableAddress[x] :
|
||||
# 7| m7_2(int[1]) = Uninitialized[x] : &:r7_1
|
||||
# 7| r7_3(int) = Constant[0] :
|
||||
# 7| r7_4(glval<int>) = PointerAdd[4] : r7_1, r7_3
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 7| Block 1
|
||||
# 7| r7_5(int) = Constant[1234] :
|
||||
# 7| m7_7(int) = Store[?] : &:r7_4, r7_5
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 7| Block 1
|
||||
# 7| r7_5(int) = Constant[5678] :
|
||||
# 7| m7_7(int) = Store[?] : &:r7_4, r7_5
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 8| Block 3
|
||||
# 8| v8_1(void) = NoOp :
|
||||
# 6| v6_5(void) = ReturnVoid :
|
||||
# 6| v6_6(void) = AliasedUse : m6_3
|
||||
# 6| v6_7(void) = ExitFunction :
|
||||
|
||||
ssa.cpp:
|
||||
# 13| int ChiPhiNode(Point*, bool, bool)
|
||||
# 13| Block 0
|
||||
@@ -1892,3 +1967,48 @@ ssa.cpp:
|
||||
# 401| v401_13(void) = ReturnVoid :
|
||||
# 401| v401_14(void) = AliasedUse : ~m408_10
|
||||
# 401| v401_15(void) = ExitFunction :
|
||||
|
||||
# 417| void nested_array_designators()
|
||||
# 417| Block 0
|
||||
# 417| v417_1(void) = EnterFunction :
|
||||
# 417| m417_2(unknown) = AliasedDefinition :
|
||||
# 417| m417_3(unknown) = InitializeNonLocal :
|
||||
# 417| m417_4(unknown) = Chi : total:m417_2, partial:m417_3
|
||||
# 418| r418_1(glval<int[1][2]>) = VariableAddress[x] :
|
||||
# 418| m418_2(int[1][2]) = Uninitialized[x] : &:r418_1
|
||||
# 418| r418_3(int) = Constant[0] :
|
||||
# 418| r418_4(glval<int[2]>) = PointerAdd[8] : r418_1, r418_3
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 418| Block 1
|
||||
# 418| r418_5(int) = Constant[0] :
|
||||
# 418| r418_7(glval<int>) = PointerAdd[4] : r418_4, r418_5
|
||||
# 418| r418_9(int) = Constant[0] :
|
||||
# 418| m418_11(int) = Store[?] : &:r418_7, r418_9
|
||||
# 418| m418_13(int[1][2]) = Chi : total:m418_2, partial:m418_11
|
||||
# 418| r418_15(int) = Constant[1] :
|
||||
# 418| r418_17(glval<int>) = PointerAdd[4] : r418_4, r418_15
|
||||
# 418| r418_19(int) = Constant[5678] :
|
||||
# 418| m418_21(int) = Store[?] : &:r418_17, r418_19
|
||||
# 418| m418_23(int[1][2]) = Chi : total:m418_13, partial:m418_21
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 418| Block 1
|
||||
# 418| r418_5(int) = Constant[0] :
|
||||
# 418| r418_7(glval<int>) = PointerAdd[4] : r418_4, r418_5
|
||||
# 418| r418_9(int) = Constant[1234] :
|
||||
# 418| m418_11(int) = Store[?] : &:r418_7, r418_9
|
||||
# 418| m418_13(int[1][2]) = Chi : total:m418_2, partial:m418_11
|
||||
# 418| r418_15(int) = Constant[1] :
|
||||
# 418| r418_17(glval<int>) = PointerAdd[4] : r418_4, r418_15
|
||||
# 418| r418_19(int) = Constant[0] :
|
||||
# 418| m418_21(int) = Store[?] : &:r418_17, r418_19
|
||||
# 418| m418_23(int[1][2]) = Chi : total:m418_13, partial:m418_21
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 419| Block 3
|
||||
# 419| v419_1(void) = NoOp :
|
||||
# 417| v417_5(void) = ReturnVoid :
|
||||
# 417| v417_6(void) = AliasedUse : m417_3
|
||||
# 417| v417_7(void) = ExitFunction :
|
||||
|
||||
@@ -1,3 +1,78 @@
|
||||
ssa.c:
|
||||
# 2| void named_designators()
|
||||
# 2| Block 0
|
||||
# 2| v2_1(void) = EnterFunction :
|
||||
# 2| m2_2(unknown) = AliasedDefinition :
|
||||
# 2| m2_3(unknown) = InitializeNonLocal :
|
||||
# 2| m2_4(unknown) = Chi : total:m2_2, partial:m2_3
|
||||
# 3| r3_1(glval<Foo>) = VariableAddress[foo] :
|
||||
# 3| m3_2(Foo) = Uninitialized[foo] : &:r3_1
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 3| Block 1
|
||||
# 3| r3_3(glval<int[2]>) = FieldAddress[x] : r3_1
|
||||
# 3| r3_5(int) = Constant[0] :
|
||||
# 3| r3_7(glval<int>) = PointerAdd[4] : r3_3, r3_5
|
||||
# 3| r3_9(int) = Constant[1234] :
|
||||
# 3| m3_11(int) = Store[?] : &:r3_7, r3_9
|
||||
# 3| m3_13(Foo) = Chi : total:m3_2, partial:m3_11
|
||||
# 3| r3_15(int) = Constant[1] :
|
||||
# 3| r3_17(glval<int>) = PointerAdd[4] : r3_3, r3_15
|
||||
# 3| r3_19(int) = Constant[0] :
|
||||
# 3| m3_21(int) = Store[?] : &:r3_17, r3_19
|
||||
# 3| m3_23(Foo) = Chi : total:m3_13, partial:m3_21
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 3| Block 1
|
||||
# 3| r3_3(glval<int[2]>) = FieldAddress[x] : r3_1
|
||||
# 3| r3_5(int) = Constant[0] :
|
||||
# 3| r3_7(glval<int>) = PointerAdd[4] : r3_3, r3_5
|
||||
# 3| r3_9(int) = Constant[0] :
|
||||
# 3| m3_11(int) = Store[?] : &:r3_7, r3_9
|
||||
# 3| m3_13(Foo) = Chi : total:m3_2, partial:m3_11
|
||||
# 3| r3_15(int) = Constant[1] :
|
||||
# 3| r3_17(glval<int>) = PointerAdd[4] : r3_3, r3_15
|
||||
# 3| r3_19(int) = Constant[5678] :
|
||||
# 3| m3_21(int) = Store[?] : &:r3_17, r3_19
|
||||
# 3| m3_23(Foo) = Chi : total:m3_13, partial:m3_21
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 4| Block 3
|
||||
# 4| v4_1(void) = NoOp :
|
||||
# 2| v2_5(void) = ReturnVoid :
|
||||
# 2| v2_6(void) = AliasedUse : m2_3
|
||||
# 2| v2_7(void) = ExitFunction :
|
||||
|
||||
# 6| void repeated_designators()
|
||||
# 6| Block 0
|
||||
# 6| v6_1(void) = EnterFunction :
|
||||
# 6| m6_2(unknown) = AliasedDefinition :
|
||||
# 6| m6_3(unknown) = InitializeNonLocal :
|
||||
# 6| m6_4(unknown) = Chi : total:m6_2, partial:m6_3
|
||||
# 7| r7_1(glval<int[1]>) = VariableAddress[x] :
|
||||
# 7| m7_2(int[1]) = Uninitialized[x] : &:r7_1
|
||||
# 7| r7_3(int) = Constant[0] :
|
||||
# 7| r7_4(glval<int>) = PointerAdd[4] : r7_1, r7_3
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 7| Block 1
|
||||
# 7| r7_5(int) = Constant[1234] :
|
||||
# 7| m7_7(int) = Store[?] : &:r7_4, r7_5
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 7| Block 1
|
||||
# 7| r7_5(int) = Constant[5678] :
|
||||
# 7| m7_7(int) = Store[?] : &:r7_4, r7_5
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 8| Block 3
|
||||
# 8| v8_1(void) = NoOp :
|
||||
# 6| v6_5(void) = ReturnVoid :
|
||||
# 6| v6_6(void) = AliasedUse : m6_3
|
||||
# 6| v6_7(void) = ExitFunction :
|
||||
|
||||
ssa.cpp:
|
||||
# 13| int ChiPhiNode(Point*, bool, bool)
|
||||
# 13| Block 0
|
||||
@@ -1881,3 +1956,48 @@ ssa.cpp:
|
||||
# 401| v401_13(void) = ReturnVoid :
|
||||
# 401| v401_14(void) = AliasedUse : ~m408_10
|
||||
# 401| v401_15(void) = ExitFunction :
|
||||
|
||||
# 417| void nested_array_designators()
|
||||
# 417| Block 0
|
||||
# 417| v417_1(void) = EnterFunction :
|
||||
# 417| m417_2(unknown) = AliasedDefinition :
|
||||
# 417| m417_3(unknown) = InitializeNonLocal :
|
||||
# 417| m417_4(unknown) = Chi : total:m417_2, partial:m417_3
|
||||
# 418| r418_1(glval<int[1][2]>) = VariableAddress[x] :
|
||||
# 418| m418_2(int[1][2]) = Uninitialized[x] : &:r418_1
|
||||
# 418| r418_3(int) = Constant[0] :
|
||||
# 418| r418_4(glval<int[2]>) = PointerAdd[8] : r418_1, r418_3
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 418| Block 1
|
||||
# 418| r418_5(int) = Constant[0] :
|
||||
# 418| r418_7(glval<int>) = PointerAdd[4] : r418_4, r418_5
|
||||
# 418| r418_9(int) = Constant[0] :
|
||||
# 418| m418_11(int) = Store[?] : &:r418_7, r418_9
|
||||
# 418| m418_13(int[1][2]) = Chi : total:m418_2, partial:m418_11
|
||||
# 418| r418_15(int) = Constant[1] :
|
||||
# 418| r418_17(glval<int>) = PointerAdd[4] : r418_4, r418_15
|
||||
# 418| r418_19(int) = Constant[5678] :
|
||||
# 418| m418_21(int) = Store[?] : &:r418_17, r418_19
|
||||
# 418| m418_23(int[1][2]) = Chi : total:m418_13, partial:m418_21
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 418| Block 1
|
||||
# 418| r418_5(int) = Constant[0] :
|
||||
# 418| r418_7(glval<int>) = PointerAdd[4] : r418_4, r418_5
|
||||
# 418| r418_9(int) = Constant[1234] :
|
||||
# 418| m418_11(int) = Store[?] : &:r418_7, r418_9
|
||||
# 418| m418_13(int[1][2]) = Chi : total:m418_2, partial:m418_11
|
||||
# 418| r418_15(int) = Constant[1] :
|
||||
# 418| r418_17(glval<int>) = PointerAdd[4] : r418_4, r418_15
|
||||
# 418| r418_19(int) = Constant[0] :
|
||||
# 418| m418_21(int) = Store[?] : &:r418_17, r418_19
|
||||
# 418| m418_23(int[1][2]) = Chi : total:m418_13, partial:m418_21
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 419| Block 3
|
||||
# 419| v419_1(void) = NoOp :
|
||||
# 417| v417_5(void) = ReturnVoid :
|
||||
# 417| v417_6(void) = AliasedUse : m417_3
|
||||
# 417| v417_7(void) = ExitFunction :
|
||||
|
||||
8
cpp/ql/test/library-tests/ir/ssa/ssa.c
Normal file
8
cpp/ql/test/library-tests/ir/ssa/ssa.c
Normal file
@@ -0,0 +1,8 @@
|
||||
struct Foo { int x[2]; };
|
||||
void named_designators() {
|
||||
struct Foo foo = {.x[0] = 1234, .x[1] = 5678};
|
||||
}
|
||||
|
||||
void repeated_designators() {
|
||||
int x[1] = {[0] = 1234, [0] = 5678};
|
||||
}
|
||||
@@ -412,4 +412,8 @@ void vla(int n1, int n2, int n3, bool b1) {
|
||||
} else {
|
||||
int b[n2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nested_array_designators() {
|
||||
int x[1][2] = {[0][0] = 1234, [0][1] = 5678};
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
ambiguousSuccessors
|
||||
| ssa.c:3:14:3:16 | Uninitialized: definition of foo | Instruction 'Uninitialized: definition of foo' has 2 successors of kind 'Goto' in function '$@'. | ssa.c:2:6:2:22 | void named_designators() | void named_designators() |
|
||||
| ssa.c:7:13:7:37 | PointerAdd: {...} | Instruction 'PointerAdd: {...}' has 2 successors of kind 'Goto' in function '$@'. | ssa.c:6:6:6:25 | void repeated_designators() | void repeated_designators() |
|
||||
| ssa.cpp:418:16:418:46 | PointerAdd: {...} | Instruction 'PointerAdd: {...}' has 2 successors of kind 'Goto' in function '$@'. | ssa.cpp:417:6:417:29 | void nested_array_designators() | void nested_array_designators() |
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
memoryOperandDefinitionIsUnmodeled
|
||||
|
||||
@@ -7,6 +7,9 @@ duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
ambiguousSuccessors
|
||||
| ssa.c:3:14:3:16 | Uninitialized: definition of foo | Instruction 'Uninitialized: definition of foo' has 2 successors of kind 'Goto' in function '$@'. | ssa.c:2:6:2:22 | void named_designators() | void named_designators() |
|
||||
| ssa.c:7:13:7:37 | PointerAdd: {...} | Instruction 'PointerAdd: {...}' has 2 successors of kind 'Goto' in function '$@'. | ssa.c:6:6:6:25 | void repeated_designators() | void repeated_designators() |
|
||||
| ssa.cpp:418:16:418:46 | PointerAdd: {...} | Instruction 'PointerAdd: {...}' has 2 successors of kind 'Goto' in function '$@'. | ssa.cpp:417:6:417:29 | void nested_array_designators() | void nested_array_designators() |
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
memoryOperandDefinitionIsUnmodeled
|
||||
|
||||
@@ -1,3 +1,72 @@
|
||||
ssa.c:
|
||||
# 2| void named_designators()
|
||||
# 2| Block 0
|
||||
# 2| v2_1(void) = EnterFunction :
|
||||
# 2| mu2_2(unknown) = AliasedDefinition :
|
||||
# 2| mu2_3(unknown) = InitializeNonLocal :
|
||||
# 3| r3_1(glval<Foo>) = VariableAddress[foo] :
|
||||
# 3| mu3_2(Foo) = Uninitialized[foo] : &:r3_1
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 3| Block 1
|
||||
# 3| r3_3(glval<int[2]>) = FieldAddress[x] : r3_1
|
||||
# 3| r3_5(int) = Constant[0] :
|
||||
# 3| r3_7(glval<int>) = PointerAdd[4] : r3_3, r3_5
|
||||
# 3| r3_9(int) = Constant[1234] :
|
||||
# 3| mu3_11(int) = Store[?] : &:r3_7, r3_9
|
||||
# 3| r3_13(int) = Constant[1] :
|
||||
# 3| r3_15(glval<int>) = PointerAdd[4] : r3_3, r3_13
|
||||
# 3| r3_17(int) = Constant[0] :
|
||||
# 3| mu3_19(int) = Store[?] : &:r3_15, r3_17
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 3| Block 1
|
||||
# 3| r3_3(glval<int[2]>) = FieldAddress[x] : r3_1
|
||||
# 3| r3_5(int) = Constant[0] :
|
||||
# 3| r3_7(glval<int>) = PointerAdd[4] : r3_3, r3_5
|
||||
# 3| r3_9(int) = Constant[0] :
|
||||
# 3| mu3_11(int) = Store[?] : &:r3_7, r3_9
|
||||
# 3| r3_13(int) = Constant[1] :
|
||||
# 3| r3_15(glval<int>) = PointerAdd[4] : r3_3, r3_13
|
||||
# 3| r3_17(int) = Constant[5678] :
|
||||
# 3| mu3_19(int) = Store[?] : &:r3_15, r3_17
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 4| Block 3
|
||||
# 4| v4_1(void) = NoOp :
|
||||
# 2| v2_4(void) = ReturnVoid :
|
||||
# 2| v2_5(void) = AliasedUse : ~m?
|
||||
# 2| v2_6(void) = ExitFunction :
|
||||
|
||||
# 6| void repeated_designators()
|
||||
# 6| Block 0
|
||||
# 6| v6_1(void) = EnterFunction :
|
||||
# 6| mu6_2(unknown) = AliasedDefinition :
|
||||
# 6| mu6_3(unknown) = InitializeNonLocal :
|
||||
# 7| r7_1(glval<int[1]>) = VariableAddress[x] :
|
||||
# 7| mu7_2(int[1]) = Uninitialized[x] : &:r7_1
|
||||
# 7| r7_3(int) = Constant[0] :
|
||||
# 7| r7_4(glval<int>) = PointerAdd[4] : r7_1, r7_3
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 7| Block 1
|
||||
# 7| r7_5(int) = Constant[1234] :
|
||||
# 7| mu7_7(int) = Store[?] : &:r7_4, r7_5
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 7| Block 1
|
||||
# 7| r7_5(int) = Constant[5678] :
|
||||
# 7| mu7_7(int) = Store[?] : &:r7_4, r7_5
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 8| Block 3
|
||||
# 8| v8_1(void) = NoOp :
|
||||
# 6| v6_4(void) = ReturnVoid :
|
||||
# 6| v6_5(void) = AliasedUse : ~m?
|
||||
# 6| v6_6(void) = ExitFunction :
|
||||
|
||||
ssa.cpp:
|
||||
# 13| int ChiPhiNode(Point*, bool, bool)
|
||||
# 13| Block 0
|
||||
@@ -1768,3 +1837,43 @@ ssa.cpp:
|
||||
# 401| v401_12(void) = ReturnVoid :
|
||||
# 401| v401_13(void) = AliasedUse : ~m?
|
||||
# 401| v401_14(void) = ExitFunction :
|
||||
|
||||
# 417| void nested_array_designators()
|
||||
# 417| Block 0
|
||||
# 417| v417_1(void) = EnterFunction :
|
||||
# 417| mu417_2(unknown) = AliasedDefinition :
|
||||
# 417| mu417_3(unknown) = InitializeNonLocal :
|
||||
# 418| r418_1(glval<int[1][2]>) = VariableAddress[x] :
|
||||
# 418| mu418_2(int[1][2]) = Uninitialized[x] : &:r418_1
|
||||
# 418| r418_3(int) = Constant[0] :
|
||||
# 418| r418_4(glval<int[2]>) = PointerAdd[8] : r418_1, r418_3
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 418| Block 1
|
||||
# 418| r418_5(int) = Constant[0] :
|
||||
# 418| r418_7(glval<int>) = PointerAdd[4] : r418_4, r418_5
|
||||
# 418| r418_9(int) = Constant[0] :
|
||||
# 418| mu418_11(int) = Store[?] : &:r418_7, r418_9
|
||||
# 418| r418_13(int) = Constant[1] :
|
||||
# 418| r418_15(glval<int>) = PointerAdd[4] : r418_4, r418_13
|
||||
# 418| r418_17(int) = Constant[5678] :
|
||||
# 418| mu418_19(int) = Store[?] : &:r418_15, r418_17
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 418| Block 1
|
||||
# 418| r418_5(int) = Constant[0] :
|
||||
# 418| r418_7(glval<int>) = PointerAdd[4] : r418_4, r418_5
|
||||
# 418| r418_9(int) = Constant[1234] :
|
||||
# 418| mu418_11(int) = Store[?] : &:r418_7, r418_9
|
||||
# 418| r418_13(int) = Constant[1] :
|
||||
# 418| r418_15(glval<int>) = PointerAdd[4] : r418_4, r418_13
|
||||
# 418| r418_17(int) = Constant[0] :
|
||||
# 418| mu418_19(int) = Store[?] : &:r418_15, r418_17
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 419| Block 3
|
||||
# 419| v419_1(void) = NoOp :
|
||||
# 417| v417_4(void) = ReturnVoid :
|
||||
# 417| v417_5(void) = AliasedUse : ~m?
|
||||
# 417| v417_6(void) = ExitFunction :
|
||||
|
||||
@@ -1,3 +1,72 @@
|
||||
ssa.c:
|
||||
# 2| void named_designators()
|
||||
# 2| Block 0
|
||||
# 2| v2_1(void) = EnterFunction :
|
||||
# 2| mu2_2(unknown) = AliasedDefinition :
|
||||
# 2| mu2_3(unknown) = InitializeNonLocal :
|
||||
# 3| r3_1(glval<Foo>) = VariableAddress[foo] :
|
||||
# 3| mu3_2(Foo) = Uninitialized[foo] : &:r3_1
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 3| Block 1
|
||||
# 3| r3_3(glval<int[2]>) = FieldAddress[x] : r3_1
|
||||
# 3| r3_5(int) = Constant[0] :
|
||||
# 3| r3_7(glval<int>) = PointerAdd[4] : r3_3, r3_5
|
||||
# 3| r3_9(int) = Constant[1234] :
|
||||
# 3| mu3_11(int) = Store[?] : &:r3_7, r3_9
|
||||
# 3| r3_13(int) = Constant[1] :
|
||||
# 3| r3_15(glval<int>) = PointerAdd[4] : r3_3, r3_13
|
||||
# 3| r3_17(int) = Constant[0] :
|
||||
# 3| mu3_19(int) = Store[?] : &:r3_15, r3_17
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 3| Block 1
|
||||
# 3| r3_3(glval<int[2]>) = FieldAddress[x] : r3_1
|
||||
# 3| r3_5(int) = Constant[0] :
|
||||
# 3| r3_7(glval<int>) = PointerAdd[4] : r3_3, r3_5
|
||||
# 3| r3_9(int) = Constant[0] :
|
||||
# 3| mu3_11(int) = Store[?] : &:r3_7, r3_9
|
||||
# 3| r3_13(int) = Constant[1] :
|
||||
# 3| r3_15(glval<int>) = PointerAdd[4] : r3_3, r3_13
|
||||
# 3| r3_17(int) = Constant[5678] :
|
||||
# 3| mu3_19(int) = Store[?] : &:r3_15, r3_17
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 4| Block 3
|
||||
# 4| v4_1(void) = NoOp :
|
||||
# 2| v2_4(void) = ReturnVoid :
|
||||
# 2| v2_5(void) = AliasedUse : ~m?
|
||||
# 2| v2_6(void) = ExitFunction :
|
||||
|
||||
# 6| void repeated_designators()
|
||||
# 6| Block 0
|
||||
# 6| v6_1(void) = EnterFunction :
|
||||
# 6| mu6_2(unknown) = AliasedDefinition :
|
||||
# 6| mu6_3(unknown) = InitializeNonLocal :
|
||||
# 7| r7_1(glval<int[1]>) = VariableAddress[x] :
|
||||
# 7| mu7_2(int[1]) = Uninitialized[x] : &:r7_1
|
||||
# 7| r7_3(int) = Constant[0] :
|
||||
# 7| r7_4(glval<int>) = PointerAdd[4] : r7_1, r7_3
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 7| Block 1
|
||||
# 7| r7_5(int) = Constant[1234] :
|
||||
# 7| mu7_7(int) = Store[?] : &:r7_4, r7_5
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 7| Block 1
|
||||
# 7| r7_5(int) = Constant[5678] :
|
||||
# 7| mu7_7(int) = Store[?] : &:r7_4, r7_5
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 8| Block 3
|
||||
# 8| v8_1(void) = NoOp :
|
||||
# 6| v6_4(void) = ReturnVoid :
|
||||
# 6| v6_5(void) = AliasedUse : ~m?
|
||||
# 6| v6_6(void) = ExitFunction :
|
||||
|
||||
ssa.cpp:
|
||||
# 13| int ChiPhiNode(Point*, bool, bool)
|
||||
# 13| Block 0
|
||||
@@ -1768,3 +1837,43 @@ ssa.cpp:
|
||||
# 401| v401_12(void) = ReturnVoid :
|
||||
# 401| v401_13(void) = AliasedUse : ~m?
|
||||
# 401| v401_14(void) = ExitFunction :
|
||||
|
||||
# 417| void nested_array_designators()
|
||||
# 417| Block 0
|
||||
# 417| v417_1(void) = EnterFunction :
|
||||
# 417| mu417_2(unknown) = AliasedDefinition :
|
||||
# 417| mu417_3(unknown) = InitializeNonLocal :
|
||||
# 418| r418_1(glval<int[1][2]>) = VariableAddress[x] :
|
||||
# 418| mu418_2(int[1][2]) = Uninitialized[x] : &:r418_1
|
||||
# 418| r418_3(int) = Constant[0] :
|
||||
# 418| r418_4(glval<int[2]>) = PointerAdd[8] : r418_1, r418_3
|
||||
#-----| Goto -> Block 1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 418| Block 1
|
||||
# 418| r418_5(int) = Constant[0] :
|
||||
# 418| r418_7(glval<int>) = PointerAdd[4] : r418_4, r418_5
|
||||
# 418| r418_9(int) = Constant[0] :
|
||||
# 418| mu418_11(int) = Store[?] : &:r418_7, r418_9
|
||||
# 418| r418_13(int) = Constant[1] :
|
||||
# 418| r418_15(glval<int>) = PointerAdd[4] : r418_4, r418_13
|
||||
# 418| r418_17(int) = Constant[5678] :
|
||||
# 418| mu418_19(int) = Store[?] : &:r418_15, r418_17
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 418| Block 1
|
||||
# 418| r418_5(int) = Constant[0] :
|
||||
# 418| r418_7(glval<int>) = PointerAdd[4] : r418_4, r418_5
|
||||
# 418| r418_9(int) = Constant[1234] :
|
||||
# 418| mu418_11(int) = Store[?] : &:r418_7, r418_9
|
||||
# 418| r418_13(int) = Constant[1] :
|
||||
# 418| r418_15(glval<int>) = PointerAdd[4] : r418_4, r418_13
|
||||
# 418| r418_17(int) = Constant[0] :
|
||||
# 418| mu418_19(int) = Store[?] : &:r418_15, r418_17
|
||||
#-----| Goto -> Block 3
|
||||
|
||||
# 419| Block 3
|
||||
# 419| v419_1(void) = NoOp :
|
||||
# 417| v417_4(void) = ReturnVoid :
|
||||
# 417| v417_5(void) = AliasedUse : ~m?
|
||||
# 417| v417_6(void) = ExitFunction :
|
||||
|
||||
Reference in New Issue
Block a user