aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/asm-subreg-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/asm-subreg-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/asm-subreg-1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/asm-subreg-1.c b/gcc/testsuite/gcc.dg/torture/asm-subreg-1.c
new file mode 100644
index 00000000000..2a539208529
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/asm-subreg-1.c
@@ -0,0 +1,14 @@
+/* PR middle-end/20491 */
+
+/* { dg-do compile } */
+
+/* Combine used to introduce invalid subregs for the asm input, and
+ we'd crash later on, when removing all subregs. */
+
+volatile unsigned short _const_32 [4] = {1,2,3,4};
+void
+evas_common_convert_yuv_420p_601_rgba()
+{
+ __asm__ __volatile__ ("" : : "X" (*_const_32));
+}
+