diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-14 00:04:49 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-14 00:04:49 (GMT) |
commit | 20289d6a5d60d1bcf979ff7fdfc236486848d149 (patch) | |
tree | 06ad6792a175f6ca1994f6bb3709c2986629af68 /tests/analysis/disass/irreducible.c | |
parent | 2a6d92e2d55c0a7826137b2cc2e3148bb298abb9 (diff) |
Handled irreducible loops without blocking.
Diffstat (limited to 'tests/analysis/disass/irreducible.c')
-rw-r--r-- | tests/analysis/disass/irreducible.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/analysis/disass/irreducible.c b/tests/analysis/disass/irreducible.c new file mode 100644 index 0000000..8edd592 --- /dev/null +++ b/tests/analysis/disass/irreducible.c @@ -0,0 +1,37 @@ + +static void argstr(char *p, int flags) +{ + if (flags) + { + tilde: + p++; + } + + for (;;) + { + switch (*p) + { + case '\0': + goto breakloop; + + case ':': + if (*--p == '~') + goto tilde; + continue; + } + + } + + breakloop: + + ; + +} + +int main(int argc, char **argv) +{ + argstr(argv[0], 0); + + return 0; + +} |