2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7015
* semantic.c (finish_asm_stmt): Fix operand/output_operands
thinko.
* typeck.c (c_expand_asm_operands): Protect from error_mark_node.
testsuite
* g++.dg/ext/asm3.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57192
138bc75d-0d04-0410-961f-
82ee72b054a4
+2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/7015
+ * semantic.c (finish_asm_stmt): Fix operand/output_operands
+ thinko.
+ * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
+
2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
PR c++/7919
tree operand;
constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)));
- operand = TREE_VALUE (output_operands);
+ operand = TREE_VALUE (t);
if (!parse_output_constraint (&constraint,
i, ninputs, noutputs,
else
{
tree type = TREE_TYPE (o[i]);
- if (CP_TYPE_CONST_P (type)
- || (IS_AGGR_TYPE_CODE (TREE_CODE (type))
- && C_TYPE_FIELDS_READONLY (type)))
+ if (type != error_mark_node
+ && (CP_TYPE_CONST_P (type)
+ || (IS_AGGR_TYPE_CODE (TREE_CODE (type))
+ && C_TYPE_FIELDS_READONLY (type))))
readonly_error (o[i], "modification by `asm'", 1);
}
}
+2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.dg/ext/asm3.C: New test.
+
2002-09-16 Richard Earnshaw <rearnsha@arm.com>
* objc.dg/bitfield-2.m (dg-options): Add -fsigned-char.
--- /dev/null
+// { dg-do compile }
+
+// Copyright (C) 2002 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 16 Sep 2002 <nathan@codesourcery.com>
+
+// PR 7015. ICE with asms
+
+int two(int in)
+{
+ register int out;
+ __asm__ ("" : "r" (out) : "r" (in)); // { dg-error "output operand" "" }
+ return out;
+}