+2010-02-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/40138
+ * fold-const.c (operand_equal_p): Handle erroneous types.
+
2010-02-01 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
* config/h8300/h8300.md (can_delay): Fix attibute condition.
operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
{
/* If either is ERROR_MARK, they aren't equal. */
- if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK)
+ if (TREE_CODE (arg0) == ERROR_MARK || TREE_CODE (arg1) == ERROR_MARK
+ || TREE_TYPE (arg0) == error_mark_node
+ || TREE_TYPE (arg1) == error_mark_node)
return 0;
/* Check equality of integer constants before bailing out due to
2010-02-03 Jason Merrill <jason@redhat.com>
+ PR c++/40138
+ * g++.dg/ext/builtin11.C: New.
+
PR c++/4926
PR c++/38600
* g++.dg/abi/mangle35.C: New.
--- /dev/null
+// PR c++/40138
+// { dg-options "-Wall" }
+
+void foo(int i, ...)
+{
+ V v; // { dg-error "not declared|expected" }
+ __builtin_va_start(v, i); // { dg-error "not declared" }
+ i = __builtin_va_arg(v, int);
+}