aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr51768.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-01-05 21:18:15 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2012-01-05 21:18:15 +0100
commit36363ebb88950dc5b411ceb1fa53d7ee2edd0a38 (patch)
tree755789193a6cfe1960b7d20642b601f382015bd8 /gcc/testsuite/c-c++-common/pr51768.c
parent1e69d24e61a1fc7a3133ca82bcef2a5a437da992 (diff)
downloadgcc-36363ebb88950dc5b411ceb1fa53d7ee2edd0a38.zip
gcc-36363ebb88950dc5b411ceb1fa53d7ee2edd0a38.tar.gz
gcc-36363ebb88950dc5b411ceb1fa53d7ee2edd0a38.tar.bz2
re PR middle-end/51768 (ICE with invalid asm goto)
PR middle-end/51768 * stmt.c (check_unique_operand_names): Don't ICE during error reporting if i is from labels chain. * c-c++-common/pr51768.c: New test. From-SVN: r182921
Diffstat (limited to 'gcc/testsuite/c-c++-common/pr51768.c')
-rw-r--r--gcc/testsuite/c-c++-common/pr51768.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/pr51768.c b/gcc/testsuite/c-c++-common/pr51768.c
new file mode 100644
index 0000000..082594c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr51768.c
@@ -0,0 +1,25 @@
+/* PR middle-end/51768 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void
+foo (void)
+{
+ asm goto ("" : : : : lab, lab, lab2, lab); /* { dg-error "duplicate asm operand name" } */
+lab:;
+lab2:;
+}
+
+void
+bar (void)
+{
+ asm goto ("" : : [lab] "i" (0) : : lab); /* { dg-error "duplicate asm operand name" } */
+lab:;
+}
+
+void
+baz (void)
+{
+ int x;
+ asm ("" : [lab] "=r" (x) : [lab] "r" (x)); /* { dg-error "duplicate asm operand name" } */
+}