GCC build failed for native with your patch on 2003-07-09T09:41:45Z.
Mark Mitchell
mark@codesourcery.com
Wed Jul 9 23:12:00 GMT 2003
On Wed, 2003-07-09 at 16:03, Jan Hubicka wrote:
> >
> > I have a small (8 lines) test-case which fails on powerpc-apple-darwin
> > but it
> > does not fail on i686-pc-linux-gnu sorry (do not know why though).
> >
> > ---------------------------------
> > cut------------------------------------------
> > union _Obj {};
> > _Obj* __next_obj;
> > template<bool __threads, int __inst> void _S_refill()
> > {
> > for (int __i = 1; ; __i++)
> > __next_obj = __next_obj;
> > }
>
> In the testcase I am seeing the problem is caused by the fact that
> PREINCREMENT_EXPR is created but it's argument 2 is bogus. Not sure
> from where the expr comes from.
Oh, great! That's the key!
PREINCREMENT_EXPR is weird -- it's a unary operator for C/C++, but a
binary operator in "tree". (It's harmless to pass an extra operand to
"build_min" in the cases that don't need it, in case you're worried.)
I am betting that this patch will fix it. Would you try that? If it
works, check it in -- or ask me to do so. Thanks for the help!
Index: typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
retrieving revision 1.477
diff -c -5 -p -r1.477 typeck.c
*** typeck.c 9 Jul 2003 08:48:03 -0000 1.477
--- typeck.c 9 Jul 2003 23:09:54 -0000
*************** build_x_unary_op (enum tree_code code, t
*** 3754,3764 ****
if (TREE_CODE (exp) == ADDR_EXPR)
PTRMEM_OK_P (exp) = ptrmem;
}
if (processing_template_decl && exp != error_mark_node)
! return build_min (code, TREE_TYPE (exp), orig_expr);
return exp;
}
/* Like c_common_truthvalue_conversion, but handle pointer-to-member
constants, where a null value is represented by an INTEGER_CST of
--- 3754,3764 ----
if (TREE_CODE (exp) == ADDR_EXPR)
PTRMEM_OK_P (exp) = ptrmem;
}
if (processing_template_decl && exp != error_mark_node)
! return build_min (code, TREE_TYPE (exp), orig_expr, NULL_TREE);
return exp;
}
/* Like c_common_truthvalue_conversion, but handle pointer-to-member
constants, where a null value is represented by an INTEGER_CST of
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
More information about the Gcc-regression
mailing list