summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr47427.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-26 13:05:39 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-26 13:05:39 +0000
commit8da090de25c137d37dd64115b1d2fa26f02577d7 (patch)
tree74bf293401a0a1429a8339ebe33c9c46166e95f7 /gcc/testsuite/gcc.c-torture/compile/pr47427.c
parent2025948bd01df153e9f3c16bd1f70ab97c9327a1 (diff)
downloadgcc-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.c28
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);
+}