diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-26 13:05:39 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-26 13:05:39 +0000 |
commit | 8da090de25c137d37dd64115b1d2fa26f02577d7 (patch) | |
tree | 74bf293401a0a1429a8339ebe33c9c46166e95f7 /gcc/testsuite/gcc.c-torture/compile/pr47427.c | |
parent | 2025948bd01df153e9f3c16bd1f70ab97c9327a1 (diff) | |
download | gcc-8da090de25c137d37dd64115b1d2fa26f02577d7.tar.gz |
2011-01-26 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 169285
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@169287 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr47427.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr47427.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr47427.c b/gcc/testsuite/gcc.c-torture/compile/pr47427.c new file mode 100644 index 00000000000..4f0b98e20c6 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr47427.c @@ -0,0 +1,28 @@ +/* PR tree-optimization/47427 */ + +char *g, *h; + +int +bar (unsigned char x, const int y) +{ +lab: + for (; h; g = h) + for (g = 0; h; h++) + { + int a = 1; + if (h) + { + if (a) + goto lab; + return y; + } + } + return x; +} + +void +foo (void) +{ + if (bar (0, 1)) + bar (1, 0); +} |