Re: [Patch, testsuite] add effective target pthread to test gcc.dg/pr54782.c
On 10 Oct 2012, at 13:17, "Greta Yorsh" wrote: > The test gcc.dg/pr54782.c uses command line option > -ftree-parallelize-loops=2 which implies -pthread and thus the test fails on > targets that do not support pthread, such as arm-none-eabi. > > This patch adds effective target check. > > Ok for trunk? > > Thanks, > Greta > > ChangeLog > > gcc/testsuite > > 2012-10-05 Greta Yorsh > >* gcc.dg/pr54782.c: Require effective target pthread. > Ok. R.
Re: [PATCH, ARM] Implement __builtin_trap
On 4 Dec 2013, at 16:08, "Ian Bolton" wrote: > Hi, > > Currently, on ARM, you have to either call abort() or raise(SIGTRAP) > to achieve a handy crash. > > This patch allows you to instead call __builtin_trap() which is much > more efficient at falling over because it becomes just a single > instruction that will trap for you. > > Two testcases have been added (for ARM and Thumb) and both pass. > > > Note: This is a modified version of a patch originally submitted by Mark > Mitchell back in 2010, which came in response to PR target/59091. > > http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00639.html > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59091 > > The main update, other than cosmetic differences, is that we've chosen > the same ARM encoding as LLVM for practical purposes. (The Thumb > encoding in Mark's patch already matched LLVM.) > > > OK for trunk? > > Cheers, > Ian > > > 2013-12-04 Ian Bolton >Mark Mitchell > > gcc/ >* config/arm/arm.md (trap): New pattern. >* config/arm/types.md: Added a type for trap. > > testsuite/ >* gcc.target/arm/builtin-trap.c: New test. >* gcc.target/arm/thumb-builtin-trap.c: Likewise. > This needs to set the conds attribute to "unconditional". Otherwise the ARM backend might try to turn this into a conditional instruction. R.
Re: [PATCH] Docs: lto.texi: Fix typo
On 20 Sep 2012, at 09:27, "陳韋任 (Wei-Ren Chen)" wrote: > Fix typo. The first "are" in the statement should be "and". > Ok. R. > Signed-off-by: Chen Wei-Ren > --- > gcc/doc/lto.texi |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/gcc/doc/lto.texi b/gcc/doc/lto.texi > index 73fd831..68f8759 100644 > --- a/gcc/doc/lto.texi > +++ b/gcc/doc/lto.texi > @@ -455,7 +455,7 @@ alone. The problem is that propagation of > inter-procedural > information does not work well across functions and variables > that are called or referenced by other compilation units (such as > from a dynamically linked library). We say that such functions > -are variables are @emph{externally visible}. > +and variables are @emph{externally visible}. > > To make the situation even more difficult, many applications > organize themselves as a set of shared libraries, and the default > -- > 1.7.3.4 >
Re: [PATCH] Fix PR C++/50970 -- Function pointer dereferenced twice in if statement on Arm cpu
On 20 Sep 2012, at 08:51, "Zhenqiang Chen" wrote: > Hi, > > PR 50970 is a general c++ front-end issue for targets which define > TARGET_PTRMEMFUNC_VBIT_LOCATION ptrmemfunc_vbit_in_delta, although the > reporter had issues only on ARM. > > Root cause: It misses a check for side effects when generating pfn and > delta related expressions. > > In the failed case, op0 is a function call. pfn0 and delta0 are > expressions based on the return value of op0. Without the check, the > function will be called twice. > > The patch is to add the check for op0. > > No make check regression on ARM. > > Is it OK for trunk? > > Thanks! > -Zhenqiang > > cp/ChangeLog: > 2012-09-20 Zhenqiang Chen > >PR c++/50970 >* typeck.c (cp_build_binary_op): Check side effects before generating >pfn and delta related expressions. > Ok. R. > diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c > index ad4b090..884f7d0 100644 > --- a/gcc/cp/typeck.c > +++ b/gcc/cp/typeck.c > @@ -4159,18 +4159,23 @@ cp_build_binary_op (location_t location, > if (TARGET_PTRMEMFUNC_VBIT_LOCATION > == ptrmemfunc_vbit_in_delta) >{ > - tree pfn0 = pfn_from_ptrmemfunc (op0); > - tree delta0 = delta_from_ptrmemfunc (op0); > - tree e1 = cp_build_binary_op (location, > -EQ_EXPR, > - pfn0, > - build_zero_cst (TREE_TYPE (pfn0)), > -complain); > - tree e2 = cp_build_binary_op (location, > -BIT_AND_EXPR, > -delta0, > -integer_one_node, > -complain); > + tree pfn0, delta0, e1, e2; > + > + if (TREE_SIDE_EFFECTS (op0)) > +op0 = save_expr (op0); > + > + pfn0 = pfn_from_ptrmemfunc (op0); > + delta0 = delta_from_ptrmemfunc (op0); > + e1 = cp_build_binary_op (location, > + EQ_EXPR, > + pfn0, > + build_zero_cst (TREE_TYPE (pfn0)), > + complain); > + e2 = cp_build_binary_op (location, > + BIT_AND_EXPR, > + delta0, > + integer_one_node, > + complain); > > if ((complain & tf_warning) > && c_inhibit_evaluation_warnings == 0 >