Skip to content

Impossible path taken for check of address to local variable. #11357

@llvmbot

Description

@llvmbot
Bugzilla Link 10985
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @tkremenek

Extended Description

Minimal test case:

Annotated Source Code
1
2 int foo(int *x)
3 {
4 int y;
5
6 if (!x) {
Assuming 'x' is non-null
Taking false branch
7 y = 0;
8 x = &y;
9 }
10
11 if (x == &y)
Taking true branch
12 return y;
Undefined or garbage value returned to caller
13 return 0;
14 }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions