Re: Drop types_compatible_p from operand_equal_p

2015-10-26 Thread Richard Biener
On Sat, 24 Oct 2015, Jan Hubicka wrote: > Hi, as discussed earlier, the types_compatible_p in operand_equal_p > seems redundant. (it is callers work to figure out how much of type > matching it wants. If not, we probably want to treat most of other > references and casts simlar way). > > Boot

[patch] Extend former fold_widened_comparison to all integral types

2015-10-26 Thread Eric Botcazou
Hi, this patch extends the simplification formerly done in fold_widened_comparison and now in match.pd to all integral types instead of just integer types, and comes with an Ada testcase for the enumeral type case. The patch introduces a failure in the C testsuite: FAIL: gcc.dg/atomic-noinline.

Re: [patch] Extend former fold_widened_comparison to all integral types

2015-10-26 Thread Andrew Pinski
On Mon, Oct 26, 2015 at 4:39 PM, Eric Botcazou wrote: > Hi, > > this patch extends the simplification formerly done in fold_widened_comparison > and now in match.pd to all integral types instead of just integer types, and > comes with an Ada testcase for the enumeral type case. > > The patch intro

Re: [PATCH] PR fortran/36192 -- Check for valid BT_INTEGER

2015-10-26 Thread FX
> 2015-10-25 Steven G. Kargl > > PR fortran/36192 > * array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling > mpz_set. > > > 2015-10-25 Steven G. Kargl > > PR fortran/36192 > * gfortran.dg/pr36192.f90: New test. OK. But I don’t understand why the

Re: Possible patch for PR fortran/66056

2015-10-26 Thread FX
> The problem: Statement labels within a type declaration are put in the > statement label tree belonging to the type declaration's namespace's (instead > of the current namespace). When the line is otherwise empty and an error is > issued, gfc_free_st_label tries to delete the label from the

Re: Move cexp simplifications to match.pd

2015-10-26 Thread Richard Biener
On Fri, Oct 23, 2015 at 5:03 PM, Richard Sandiford wrote: > This required reinstating support for captures in the result > of a simplification. That part (genmatch.c) is by Richard B. > > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? > > Thanks, > Richard >

Re: [PATCH] tree-scalar-evolution.c: Handle LSHIFT by constant

2015-10-26 Thread Richard Biener
On Fri, Oct 23, 2015 at 5:15 PM, Alan Lawrence wrote: > On 19/10/15 12:49, Richard Biener wrote: > >> Err, you should always do the shift in the type of rhs1. You should also >> avoid the chrec_convert of rhs2 above for shifts. > > Err, yes, indeed. Needed to keep the chrec_convert before the >

[PATCH]Add -fprofile-use option for check_effective_target_freorder.

2015-10-26 Thread Renlin Li
Hi all, After r228136, flag_reorder_blocks_and_partition is canceled when -fprofile-use is not specified. In this case check_effective_target_freorder() is not able to check the proper target support. This is a simple patch to add "-fprofile-use" option that effective target check. Okay to

Re: [PATCH, PR68062] Fix uniform vector operation lowering

2015-10-26 Thread Richard Biener
On Sat, Oct 24, 2015 at 12:29 AM, Ilya Enkovich wrote: > 2015-10-24 0:32 GMT+03:00 Jeff Law : >> On 10/23/2015 09:26 AM, Ilya Enkovich wrote: >>> >>> Hi, >>> >>> This patch checks optab exists before using it vector vector statement >>> lowering. It fixes compilation of test from PR68062 with -fu

Re: [gomp4] Adjust UNQUE ifn

2015-10-26 Thread Thomas Schwinge
Hi Nathan! On Sun, 25 Oct 2015 10:01:55 -0400, Nathan Sidwell wrote: > I've applied this patch to gomp4 branch. It's the reworking of IFN_UNIQUE > suggested by Richard & Jakub. > > 1) IFN_UNIQUE is a ctrl-altering call, and thus ends up at the end of a BB. > 2) tracer only needs to check that

Re: RFC: PATCH to pointer_int_sum vs. pointer-arith-10.c

2015-10-26 Thread Richard Biener
On Sat, Oct 24, 2015 at 5:14 AM, Jason Merrill wrote: > On 10/21/2015 12:16 AM, Richard Biener wrote: >> >> On Tue, Oct 20, 2015 at 9:10 PM, Jason Merrill wrote: >>> >>> I made this change on the delayed folding branch and then noticed that it >>> broke pointer-arith-10.c, which you added to the

Re: Possible patch for PR fortran/66056

2015-10-26 Thread Louis Krupp
A patch with ChangeLog diffs is attached. I ran "make && make install && make check-fortran" at the top level on x86_64-pc-linux-gnu. (I always do that before I post a patch and again before I actually check anything in. I sometimes forget to include files when I finally commit, but I'm alway

Re: Handle OBJ_TYPE_REF in operand_equal_p

2015-10-26 Thread Richard Biener
On Sat, Oct 24, 2015 at 7:31 PM, Jan Hubicka wrote: > Hello, > this patch adds OBJ_TYPE_REF that is the only code handled by ipa-icf-gimple > but not bu operand_equal_p. I tried to make the following testcase: > > /* { dg-do compile } */ > /* { dg-options "-O2 -fdump-tree-pre" } */ > struct foo {

Re: Move some bit and binary optimizations in simplify and match

2015-10-26 Thread Richard Biener
On Sat, Oct 24, 2015 at 11:15 PM, Marc Glisse wrote: > On Fri, 23 Oct 2015, Hurugalawadi, Naveen wrote: > > + (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1)) > > I am not sure why we have :c on one bit_and but not the other. Clearly an omission. > + (bit_ior:c (bit_and:c @0 (bit_not @1))

Re: Move some bit and binary optimizations in simplify and match

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:26 AM, Richard Biener wrote: > On Sat, Oct 24, 2015 at 11:15 PM, Marc Glisse wrote: >> On Fri, 23 Oct 2015, Hurugalawadi, Naveen wrote: >> >> + (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1)) >> >> I am not sure why we have :c on one bit_and but not the other. >

Re: Possible patch for PR fortran/66056

2015-10-26 Thread FX
> I ran "make && make install && make check-fortran" at the top level on > x86_64-pc-linux-gnu. (I always do that before I post a patch and again > before I actually check anything in. I sometimes forget to include files > when I finally commit, but I'm always confident that the ones I remembe

Re: [PATCH, PR68062] Fix uniform vector operation lowering

2015-10-26 Thread Ilya Enkovich
On 26 Oct 10:09, Richard Biener wrote: > On Sat, Oct 24, 2015 at 12:29 AM, Ilya Enkovich > wrote: > > 2015-10-24 0:32 GMT+03:00 Jeff Law : > >> On 10/23/2015 09:26 AM, Ilya Enkovich wrote: > >>> > >>> Hi, > >>> > >>> This patch checks optab exists before using it vector vector statement > >>> low

Don't create SSA names until in SSA form

2015-10-26 Thread Richard Sandiford
An upcoming patch adds a fold from hypot(x,x) to fabs(x)*sqrt(2). This is unusual in that it could trigger in the gimplifier but would require new SSA names to be created. This patch makes sure that we don't try to create new SSA names when we're not yet in SSA form. Tested on x86_64-linux-gnu, a

Move hypot folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_hypot): Delete. (fold_builtin_2): Handle constant hypot arguments here. * match.pd: Fold hypot(x, 0) and hypot(0, x) to x. Canonicalize

Allow more complex call replacements in gimple-fold.c

2015-10-26 Thread Richard Sandiford
An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z) to pow(x,y*z). This fold can reuse the existing pow gimple statement and simply replace the operands with x and y*z. However, the y*z itself requires a separate gimple statement and the code wasn't prepared to handle that. Tested

Move pow folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_pow): Delete in favor of... (fold_const_builtin_pow): ...this new function. Only handle constant arguments. (fold_builtin_2): Updat

Re: [OpenACC 4/11] C FE changes

2015-10-26 Thread Jakub Jelinek
On Sat, Oct 24, 2015 at 02:10:26PM -0700, Cesar Philippidis wrote: > +static tree > +c_parser_oacc_shape_clause (c_parser *parser, omp_clause_code kind, > + const char *str, tree list) > +{ > + const char *id = "num"; > + tree ops[2] = { NULL_TREE, NULL_TREE }, c; > + loc

Re: [PATCH 5/9] ENABLE_CHECKING refactoring: pool allocators

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 2:18 AM, Mikhail Maltsev wrote: > On 10/21/2015 01:57 PM, Richard Biener wrote: >> Ugh (stupid templates). >> >> @@ -387,10 +389,10 @@ base_pool_allocator ::allocate () >>block = m_virgin_free_list; >>header = (allocation_pool_list*) allocation_object::get_d

Move powi folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_powi): Delete. (fold_builtin_2): Handle constant powi arguments here. * match.pd: Add rules previously handled by fold_builtin_powi. gcc/te

Move expN folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_exponent): Delete. (fold_builtin_2): Handle constant expN arguments here. * match.pd: Fold expN(logN(x)) -> x. diff --git a/gcc/builtins.c

Re: [patch] Extend former fold_widened_comparison to all integral types

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 9:39 AM, Eric Botcazou wrote: > Hi, > > this patch extends the simplification formerly done in fold_widened_comparison > and now in match.pd to all integral types instead of just integer types, and > comes with an Ada testcase for the enumeral type case. > > The patch intro

Move signbit folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_signbit): Delete. (fold_builtin_2): Handle constant signbit arguments here. * match.pd: Add rules previously handled by fold_builtin_signbit

Move copysign folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_copysign): Delete. (fold_builtin_2): Handle constant copysign arguments here. * match.pd: Add rules previously handled by fold_builtin_copys

Re: [PATCH, PR68062] Fix uniform vector operation lowering

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:35 AM, Ilya Enkovich wrote: > On 26 Oct 10:09, Richard Biener wrote: >> On Sat, Oct 24, 2015 at 12:29 AM, Ilya Enkovich >> wrote: >> > 2015-10-24 0:32 GMT+03:00 Jeff Law : >> >> On 10/23/2015 09:26 AM, Ilya Enkovich wrote: >> >>> >> >>> Hi, >> >>> >> >>> This patch che

Remove constant handling from fold_builtin_{,f}abs

2015-10-26 Thread Richard Sandiford
fold_builtin_fabs and fold_builtin_abs had code to handle constant arguments, but this simply duplicated what the following fold_build1_loc would do for ABS_EXPR. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_

Split constant handling out of fold_builtin_fma

2015-10-26 Thread Richard Sandiford
Just makes an upcoming patch a bit clearer. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_fma): Remove constant handling. (fold_builtin_3): Handle constant fma arguments here. diff --git a/gcc

Re: Don't create SSA names until in SSA form

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:36 AM, Richard Sandiford wrote: > An upcoming patch adds a fold from hypot(x,x) to fabs(x)*sqrt(2). > This is unusual in that it could trigger in the gimplifier but would > require new SSA names to be created. This patch makes sure that we > don't try to create new SSA

Re: Move hypot folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:38 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_hypot): Delete. > (fold_builtin_2): Handle constant

Move min(max...) and max(min...) folds to match.pd

2015-10-26 Thread Richard Sandiford
This handles both integer and floating-point arguments. It's needed for the follow-on patch to move fmin and fmax to match.pd. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * fold-const.c (fold_minmax): Delete. (fold_bi

Move fmin and fmax folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_fmin_fmax): Delete. (fold_builtin_2): Handle constant fmin and fmax arguments here. * match.pd: Add rules previously handled by fold_builtin

Re: [Patch, Fortran, 66927, v2.1] [6 Regression] ICE in gfc_conf_procedure_call

2015-10-26 Thread Andre Vehreschild
Hi all, unfortunately did my last patch create a segfault on some 32-bit system. This happens because in the scalarizer the lower bound of the deferred length array of the source= expression was taken to be constant zero instead of taking that information from the array descriptor. This patch fixe

Rename logb and significand folds

2015-10-26 Thread Richard Sandiford
fold_builtin_logb and fold_builtin_significand now only handle constant arguments, so this patch renames them to fold_const..., to match fold_const_builtin_pow. The idea is to differentiate constant-only folds so that they can be moved to a const_binop-like function in future. The functions also

Re: [OpenACC 4/11] C FE changes

2015-10-26 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 09:59:49AM +0100, Jakub Jelinek wrote: > Ok for trunk with those changes fixed. Oops, I've missed that there is no checking of the type (that the expressions have INTEGRAL_TYPE_P); in the C FE, this is sometimes done already during the parsing, sometimes during c_finish_omp

Move ldexp, scalbn and scalbln folds to match.pd

2015-10-26 Thread Richard Sandiford
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.c (fold_builtin_load_exponent): Rename to... (fold_const_builtin_load_exponent): ...this and only handle constant arguments. (fold_builtin_2): Updat

Re: [PATCH] libjava: fix locale handling when sorting JNI methods

2015-10-26 Thread Andrew Haley
On 23/10/15 04:56, Mike Frysinger wrote: > 2015-10-22 Mike Frysinger > > * scripts/check_jni_methods.sh.in: Run sort with LC_ALL=C, and > combine `sort|uniq` into `sort -u`. Looks OK to me. Andrew.

Re: Allow more complex call replacements in gimple-fold.c

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:41 AM, Richard Sandiford wrote: > An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z) > to pow(x,y*z). This fold can reuse the existing pow gimple statement > and simply replace the operands with x and y*z. However, the y*z > itself requires a separate gi

Re: [PATCH 1/2] s/390: Implement "target" attribute.

2015-10-26 Thread Dominik Vogt
On Fri, Sep 25, 2015 at 02:59:41PM +0100, Dominik Vogt wrote: > The following set of two patches implements the function > __attribute__ ((target("..."))) and the corresponding #pragma GCC > target("...") on S/390. It comes with certain limitations: > > * It is not possible to change any options

Re: Move pow folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:44 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_pow): Delete in favor of... > (fold_const_builtin_p

Re: [PATCH] PR fortran/36192 -- Check for valid BT_INTEGER

2015-10-26 Thread Dominique d'Humières
With the patch compiling the original test still gives … pr36192.f90:39:10: x_n, v_n, & ! Configuration at t+dt with step dt 1 Error: The module or main program array 'x_n' at (1) must have constant shape f951: internal compiler error: Segmentation fault: 11 Domini

Re: Move powi folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:48 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_powi): Delete. > (fold_builtin_2): Handle constant

Re: Move expN folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:50 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_exponent): Delete. > (fold_builtin_2): Handle const

Re: [PATCH, PR68062] Fix uniform vector operation lowering

2015-10-26 Thread Ilya Enkovich
On 26 Oct 10:56, Richard Biener wrote: > On Mon, Oct 26, 2015 at 10:35 AM, Ilya Enkovich > wrote: > > On 26 Oct 10:09, Richard Biener wrote: > >> On Sat, Oct 24, 2015 at 12:29 AM, Ilya Enkovich > >> wrote: > >> > 2015-10-24 0:32 GMT+03:00 Jeff Law : > >> >> On 10/23/2015 09:26 AM, Ilya Enkovich

Re: [patch] Extend former fold_widened_comparison to all integral types

2015-10-26 Thread Eric Botcazou
> I think excluding enums had sth to do with C++ -f[no-]strict-enums > (whatever is the default). Just tried to figure where the check > came from ... both calls are keyed on INTEGER_TYPE... Here's the relevant block of code from the C++ front-end: /* The middle-end currently assumes that

Re: Move signbit folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:52 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_signbit): Delete. > (fold_builtin_2): Handle consta

Re: [OpenACC 5/11] C++ FE changes

2015-10-26 Thread Jakub Jelinek
On Sat, Oct 24, 2015 at 02:11:41PM -0700, Cesar Philippidis wrote: > @@ -29582,6 +29592,144 @@ cp_parser_oacc_data_clause_deviceptr (cp_parser > *parser, tree list) >return list; > } > > +/* OpenACC 2.0: > + auto > + independent > + nohost > + seq */ > + > +static tree > +cp_parser_

Re: Allow more complex call replacements in gimple-fold.c

2015-10-26 Thread Richard Sandiford
Richard Biener writes: > On Mon, Oct 26, 2015 at 10:41 AM, Richard Sandiford > wrote: >> An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z) >> to pow(x,y*z). This fold can reuse the existing pow gimple statement >> and simply replace the operands with x and y*z. However, the y*z

Re: Move expN folds to match.pd

2015-10-26 Thread Marc Glisse
On Mon, 26 Oct 2015, Richard Sandiford wrote: + /* expN(logN(x)) -> x. */ + (simplify + (exps (logs @0)) + @0)) We are not very consistent about it, but wasn't there an idea that we should use non_lvalue in most such places? -- Marc Glisse

[PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Kyrill Tkachov
Hi all, The auto_inc_dec pass can handle 4 types of sequences, described in the comment at the start of auto-inc-dec.c. In two of those: FORM_PRE_ADD and FORM_POST_ADD the resulting sequence is a move followed by a POST_INC or PRE_INC memory operation. In the FORM_POST_ADD case the pass transfo

Re: Move copysign folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:54 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_copysign): Delete. > (fold_builtin_2): Handle const

Re: Remove constant handling from fold_builtin_{,f}abs

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:56 AM, Richard Sandiford wrote: > fold_builtin_fabs and fold_builtin_abs had code to handle constant > arguments, but this simply duplicated what the following fold_build1_loc > would do for ABS_EXPR. > > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueab

Re: Split constant handling out of fold_builtin_fma

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 10:57 AM, Richard Sandiford wrote: > Just makes an upcoming patch a bit clearer. > > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_fma): Remov

Re: Move min(max...) and max(min...) folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:00 AM, Richard Sandiford wrote: > This handles both integer and floating-point arguments. It's needed > for the follow-on patch to move fmin and fmax to match.pd. > > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Ric

[Ada] Spurious duplicate Default_Iterator error

2015-10-26 Thread Arnaud Charlet
This patch fixes a bug that caused the compiler to issue the error "default iterator must be unique" when one of the alleged "duplicates" is overridden by another. This can happen in cases involving types derived from types declared in generic formal packages. The error message (when it is correct)

[Ada] Expression functions, internal bodies and freezing of contracts

2015-10-26 Thread Arnaud Charlet
This patch ensures that only source package and subprogram bodies "freeze" the contract of the nearest enclosing package body. -- Source -- -- expr_funcs.ads package Expr_Funcs with SPARK_Mode, Abstract_State => State is Var_1 : Integer := 1; function I

Re: Move fmin and fmax folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:02 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_fmin_fmax): Delete. > (fold_builtin_2): Handle cons

Re: Rename logb and significand folds

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:05 AM, Richard Sandiford wrote: > fold_builtin_logb and fold_builtin_significand now only handle > constant arguments, so this patch renames them to fold_const..., > to match fold_const_builtin_pow. The idea is to differentiate > constant-only folds so that they can be

[Ada] Missing error on conflicting declarations

2015-10-26 Thread Arnaud Charlet
With This patch the compiler properly rejects a subprogram body whose signature is type conformant with a previous expression function in the same scope. Compiling same_signature,adb must yield: same_signature.adb:8:04: body conflicts with expression function at line 5 --- with Ada.Text_IO; us

[Committed] Inline get_vi_for_tree into intra_create_variable_infos

2015-10-26 Thread Tom de Vries
Hi, this no-functional-changes patch inlines get_vi_for_tree into intra_create_variable_infos. It exposes the interaction with create_variable_info_for_1, and makes it clear that we're using none of the constraint handling from create_variable_info_for. Bootstrapped and reg-tested on x86_6

[Committed] Add vars in intra_create_variables_info

2015-10-26 Thread Tom de Vries
Hi, this no-functional-changes patch adds some vars in intra_create_variables_info. Bootstrapped and reg-tested on x86_64. Committed as trivial. Thanks, - Tom Add vars in intra_create_variables_info 2015-10-26 Tom de Vries * tree-ssa-structalias.c (intra_create_variable_infos): Add re

Re: [PATCH 5/9] ENABLE_CHECKING refactoring: pool allocators

2015-10-26 Thread Mikhail Maltsev
On 10/26/2015 12:47 PM, Richard Biener wrote: > I committed the attached to fix build with the valgrind annotations active. > > Richard. > Doh! Sorry for breakage. -- Regards, Mikhail Maltsev

[comitted] Add make_restrict_var_constraints

2015-10-26 Thread Tom de Vries
Hi, this no-functional-changes patch factors a new function make_restrict_var_constraints out of intra_create_variable_infos. Bootstrapped and reg-tested on x86_64. Committed as trivial. Thanks, - Tom Add make_restrict_var_constraints 2015-10-26 Tom de Vries * tree-ssa-structalias.c (m

[Ada] SPARK_Mode on synchronized units and entry declarations

2015-10-26 Thread Arnaud Charlet
This patch implements the following semantic rules: The SPARK_Mode aspect can be used in the following places in the code: * on a library-level subprogram spec or body (which now includes entry declarations) * on a library-level task spec or body * on a library-level protected

[PATCH] Fix VEC_COND_EXPR types when vectorizing conditional expressions

2015-10-26 Thread Alan Hayward
VEC_COND_EXPRs have been changed to use boolean vectors for the first argument. This changes the vectorizing conditional expressions to use this new format, fixing the compiler failures for the 65947-*.c tests. 2015-10-26 Alan Hayward gcc/ PR tree-optimization/65947 * tree-vect

Re: [PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Bernd Schmidt
On 10/26/2015 11:40 AM, Kyrill Tkachov wrote: In the FORM_POST_ADD case the pass transforms: *a ... b <- a + c into b <- a ... *(b += c) post However, the code in attempt_change that compares the costs of the before and

[Ada] Local name hides global item

2015-10-26 Thread Arnaud Charlet
This patch modifies the analysis of pragmas Depends, Global, Refined_Depends and Refined_Global when they appear in a subprogram body. The pragmas are now analyzed immediately and in pairs. This preserves the inherent dependency of [Refined_]Depends on [Refined_]Global and prevents a visibility iss

[Ada] Pragma Volatile_Function has no effect on subprogram body

2015-10-26 Thread Arnaud Charlet
This patch modifies the analysis of pragmas that appear on package specs and and subprogram bodies. The new model of analysis allows for pragmas to appear out of order, but they are still analyzed according to internal precedence. The patch removes the restrictions concerning the declarations order

Re: Move ldexp, scalbn and scalbln folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:08 AM, Richard Sandiford wrote: > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok. Thanks, Richard. > Thanks, > Richard > > > gcc/ > * builtins.c (fold_builtin_load_exponent): Rename to... > (fold_const_builtin_

[PATCH, 1/2] Add handle_param parameter to create_variable_info_for_1

2015-10-26 Thread Tom de Vries
Hi, this no-functional-changes patch copies the restrict var declaration code from intra_create_variable_infos to create_variable_info_for_1. The code was copied rather than moved, since in fipa-pta mode the varinfo p for the parameter t may already exist due to create_function_info_for, in

[PATCH, 2/2] Handle recursive restrict pointer in create_variable_info_for_1

2015-10-26 Thread Tom de Vries
Hi, this patch enables recursive restrict handling in create_variable_info_for_1. This allows us to interpret all restricts in a function parameter "int *restrict *restrict *restrict a". This patch is the first step towards implementing a generic fix for PR67742. Bootstrapped and reg-tested

Re: Allow more complex call replacements in gimple-fold.c

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:30 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, Oct 26, 2015 at 10:41 AM, Richard Sandiford >> wrote: >>> An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z) >>> to pow(x,y*z). This fold can reuse the existing pow gimple statement >>>

Re: Move expN folds to match.pd

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 11:32 AM, Marc Glisse wrote: > On Mon, 26 Oct 2015, Richard Sandiford wrote: > >> + /* expN(logN(x)) -> x. */ >> + (simplify >> + (exps (logs @0)) >> + @0)) > > > We are not very consistent about it, but wasn't there an idea that we should > use non_lvalue in most su

[Ada] Front-end inlining and predicates

2015-10-26 Thread Arnaud Charlet
The front-end cannot inline subprograms that contain certain declarations, such as nested subprograms. If the the subprogram to inline includes a subtype declaration with predicates, it cannot be inlined because the analysis of the predicate will generate (nested) predicate functions. Source: --

[Ada] Contracts on protected entries and task units

2015-10-26 Thread Arnaud Charlet
This patch implements pragmas [Refined_]Depends and [Refined_]Global on protected entries and task units. As a prerequisite, the patch implements aspect specifications on entry bodies as specified in Ada 2012 (AI12-0169): ENTRY_BODY ::= entry DEFINING_IDENTIFIER ENTRY_BODY_FORMAL_PART

Re: [PATCH] Fix VEC_COND_EXPR types when vectorizing conditional expressions

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 12:12 PM, Alan Hayward wrote: > VEC_COND_EXPRs have been changed to use boolean vectors for the first > argument. > This changes the vectorizing conditional expressions to use this new > format, > fixing the compiler failures for the 65947-*.c tests. Ok. Richard. > > 201

Re: [PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Bernd Schmidt
On 10/26/2015 12:12 PM, Bernd Schmidt wrote: But isn't that balanced by the fact that it doesn't seem to take into account the gain of removing the inc_insn either? So I think this can't be right. Argh, misread the code. The patch is OK with the change I suggested. Bernd

[patch committed SH] Fix PR target/68091

2015-10-26 Thread Kaz Kojima
I've applied the attached one liner as a quick fix for PR target/68091 which is a 6 regression. sh_vector_mode_supported_p returns true even if the target has no mov insns for some vector modes and causes ICEs for several vector tests. Tested on sh4-unknown-linux-gnu. Regards, kaz -- 201

[PATCH] Fix PR68087

2015-10-26 Thread Markus Trippelsdorf
Hi, the patch below fixes PR68087, an ICE caused by referring to a negative constexpr array element. Bootstrapped and tested on ppc64le. OK for trunk? gcc-5 also needs a slightly different fix. I'll post that as a follow-up, once this one gets approved. PR c++/68087 * constexpr.

[Ada] Spawning processes with no PATH

2015-10-26 Thread Arnaud Charlet
This patch fixes a bug in which GNAT.Expect.Non_Blocking_Spawn fails to find an executable when the PATH environment variable is not set. The executable should be found if it contains a directory name. The following test should execute quietly. gnatmake -q do_nothing.adb gnatmake -q spawn.adb uns

[Ada] Spurious errors with -gnatE and -gnatwl

2015-10-26 Thread Arnaud Charlet
This patch removes spurious errors triggered by the switches -gnatE (Dynamic elaboration) and -gnatwl (list elaboration warnings) when the elaboration call is appears in the prefix of an access attribute. Compiling gcc -c dds-translator.adb -gnatE -gnatwl must yield: dds-translator-genera

Re: [PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-10-26 Thread Bernd Schmidt
On 10/23/2015 10:40 PM, Martin Sebor wrote: The original code deliberately avoids diagnosing the case of last array members with bounds greater than 1 (see the comment about "a poor man's flexible array member" added with a fix for bug 41935) and I didn't want to change that. Jakub added that,

[Ada] Clean up in s-osinte

2015-10-26 Thread Arnaud Charlet
This patch cleans the way getpagesize() is imported and removes an inconsistency wrt the underlying C routine. No change in functionality. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-26 Arnaud Charlet * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,

Re: [PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-10-26 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 12:40:18PM +0100, Bernd Schmidt wrote: > On 10/23/2015 10:40 PM, Martin Sebor wrote: > > > >The original code deliberately avoids diagnosing the case of last > >array members with bounds greater than 1 (see the comment about > >"a poor man's flexible array member" added with

[Ada] Overloaded indexing operations of a derived type

2015-10-26 Thread Arnaud Charlet
This patch fixes the handling of overloaded indexing operations that are inherited by a type derived from one that carries an indexing aspect. Source: --- with Ada.Text_Io; use Ada.Text_Io; with References; procedure Main is A : aliased References.Iterated; begin A (1) := 42; Put_Line ("A

Re: [PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Kyrill Tkachov
On 26/10/15 11:28, Bernd Schmidt wrote: On 10/26/2015 12:12 PM, Bernd Schmidt wrote: But isn't that balanced by the fact that it doesn't seem to take into account the gain of removing the inc_insn either? So I think this can't be right. Argh, misread the code. The patch is OK with the change

[Ada] Extraction of components/discriminants of concurrent types

2015-10-26 Thread Arnaud Charlet
This patch allows First_Component and First_Component_Or_Discriminant to apply to protected and task types. No change in behavior, no test needed. The patch is aimed at clients of the compiler front-end. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-26 Hristian Kirtchev *

[Ada] In an element iterator, the element is constant if the container is.

2015-10-26 Thread Arnaud Charlet
This patch adds a legality check to element iterators over containers: the element is a constant if the container object is a constant, even if the container type has a Variable_Indexing aspect. Compiling the following must be rejected with: strange_behavior.adb:12:07: left hand side of assignme

Re: [PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-10-26 Thread Bernd Schmidt
On 10/26/2015 12:47 PM, Jakub Jelinek wrote: Because the amount of code that uses this (including GCC itself) is just too huge, so everywhere in the middle-end we also special case last array members of structs. While C99+ has flexible array members, e.g. C++ does not, so users are left with us

Re: [PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-10-26 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 12:57:53PM +0100, Bernd Schmidt wrote: > On 10/26/2015 12:47 PM, Jakub Jelinek wrote: > > >Because the amount of code that uses this (including GCC itself) is just too > >huge, so everywhere in the middle-end we also special case last array > >members of > >structs. While

Re: [Patch, Fortran, 66927, v2.1] [6 Regression] ICE in gfc_conf_procedure_call

2015-10-26 Thread Paul Richard Thomas
Hi Andre, Yes, that's good to fix the problem. OK to commit Thanks for the rapid fix. Paul On 26 October 2015 at 11:03, Andre Vehreschild wrote: > Hi all, > > unfortunately did my last patch create a segfault on some 32-bit > system. This happens because in the scalarizer the lower bound of th

[Ada] Restriction No_Dynamic_Sized_Objects

2015-10-26 Thread Arnaud Charlet
This patch implements a new restriction No_Dynamic_Sized_Objects, which is intended to prevent the creation of composite objects of non-static size. The following test should get an error. gcc -c dynamic_string.adb -gnatws dynamic_string.adb:4:18: violation of restriction "No_Dynamic_Sized_Object

Re: [PATCH 1/2] s/390: Implement "target" attribute.

2015-10-26 Thread Dominik Vogt
On Fri, Sep 25, 2015 at 02:59:41PM +0100, Dominik Vogt wrote: > The following set of two patches implements the function > __attribute__ ((target("..."))) and the corresponding #pragma GCC > target("...") on S/390. It comes with certain limitations: > > * It is not possible to change any options

Re: [PATCH][ARM] PR target/67929 Tighten vfp3_const_double_for_bits checks

2015-10-26 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01350.html and the backport for 4.9/5 https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01351.html Thanks, Kyrill On 14/10/15 13:23, Kyrill Tkachov wrote: Hi all, This patch fixes the referenced PR by rewriting the vfp3_const_double_for_bits f

Re: [PATCH][auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases

2015-10-26 Thread Oleg Endo
On Mon, 2015-10-26 at 12:12 +0100, Bernd Schmidt wrote: > On 10/26/2015 11:40 AM, Kyrill Tkachov wrote: > > In the FORM_POST_ADD case the pass transforms: > > *a > > ... > > b <- a + c > > > > into > > > > b <- a > > ... > >

Re: [PATCH] Fix PR68087

2015-10-26 Thread Richard Biener
On Mon, Oct 26, 2015 at 12:32 PM, Markus Trippelsdorf wrote: > Hi, > > the patch below fixes PR68087, an ICE caused by referring to a negative > constexpr array element. > > Bootstrapped and tested on ppc64le. > OK for trunk? > > gcc-5 also needs a slightly different fix. I'll post that as a > fol

[RFC] Improving alias dumps

2015-10-26 Thread Tom de Vries
Hi, After spending some time looking at ealias/pta dumps, I realized that they're hard to understand because we use varinfo names to identify varinfos, while those names are not necessarily unique. F.i., for a function f: ... void f (int *__restrict__ a, int *__restrict__ b) { *a = 1; *b

  1   2   3   >