summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-14 08:52:21 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-14 08:52:21 +0000
commitd0b175bffc2f2cb91d1fb529b7c36d3e984d9594 (patch)
treeeb438cb5c7cabed8d102b2c0c1bdd1b0aebb59eb /gcc/testsuite/gcc.c-torture/compile
parent5e3123db0a9b4c8def9fee64446b130ce81ace45 (diff)
downloadgcc-d0b175bffc2f2cb91d1fb529b7c36d3e984d9594.tar.gz
2011-12-14 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 182322 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@182325 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr51495.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51495.c b/gcc/testsuite/gcc.c-torture/compile/pr51495.c
new file mode 100644
index 00000000000..34de37b5309
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr51495.c
@@ -0,0 +1,14 @@
+/* PR rtl-optimization/51495 */
+
+void bar (void);
+
+int
+foo (int i)
+{
+ static const void *const table[] = { &&begin, &&end };
+ goto *(table[i]);
+begin:
+ bar ();
+end:
+ return 0;
+}