aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-05-09 05:15:50 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-05-09 05:15:50 +0000
commit4bbcb8fcd4e2627b062cb46083da89f919ae799e (patch)
tree245cc8a9f17f8534b5a32132959495818cef308f
parent65ab381cbf67c1fa0a30499ce03a4cfc4e82234c (diff)
downloadgcc-4bbcb8fcd4e2627b062cb46083da89f919ae799e.zip
gcc-4bbcb8fcd4e2627b062cb46083da89f919ae799e.tar.gz
gcc-4bbcb8fcd4e2627b062cb46083da89f919ae799e.tar.bz2
re PR inline-asm/8788 (ICE in emit_move_insn, at expr.c:3089)
PR inline-asm/8788 * stmt.c (expand_asm_operands): Avoid calling force_reg on BLKmode operands. * gcc.dg/pr8788-1.c: New testcase. From-SVN: r99422
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/stmt.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr8788-1.c20
4 files changed, 32 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 418fa80..e4f13a8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-08 Roger Sayle <roger@eyesopen.com>
+
+ PR inline-asm/8788
+ * stmt.c (expand_asm_operands): Avoid calling force_reg on BLKmode
+ operands.
+
2005-05-08 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (adjust_address): Fix typo last change.
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 94b018a..d1e71de 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -877,7 +877,7 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
if (asm_operand_ok (op, constraint) <= 0)
{
- if (allows_reg)
+ if (allows_reg && TYPE_MODE (type) != BLKmode)
op = force_reg (TYPE_MODE (type), op);
else if (!allows_mem)
warning (0, "asm operand %d probably doesn%'t match constraints",
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3d4ba31..48d9936 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-08 Roger Sayle <roger@eyesopen.com>
+
+ PR inline-asm/8788
+ * gcc.dg/pr8788-1.c: New testcase.
+
2005-05-08 Richard Sandiford <rsandifo@redhat.com>
PR target/21416
diff --git a/gcc/testsuite/gcc.dg/pr8788-1.c b/gcc/testsuite/gcc.dg/pr8788-1.c
new file mode 100644
index 0000000..74e1694
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr8788-1.c
@@ -0,0 +1,20 @@
+/* PR inline-asm/8788 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef struct {
+ long x[6];
+} myjmp_buf;
+
+typedef struct {
+ myjmp_buf regs;
+} my_stack;
+
+void switch_to_stack (my_stack *stack){
+ asm ( /* { dg-error "impossible constraint" } */
+/* { dg-warning "asm operand 1" "asm operand 1" { target *-*-* } 14 } */
+ "\n"
+ : "+r" (stack->regs)
+ );
+}
+