Re: [PATCH] rs6000: Follow up for signed integer overflow fix

2014-11-20 Thread Jakub Jelinek
On Thu, Nov 20, 2014 at 07:41:43PM +0100, Markus Trippelsdorf wrote: 2014-11-20 Markus Trippelsdorf mar...@trippelsdorf.de * config/rs6000/rs6000.c (includes_rldic_lshift_p): Cast 0 to unsigned. (includes_rldicr_lshift_p): Likewise. diff --git a/gcc/config/rs6000/rs6000.c

Re: [PATCH] Fix ICE with non-lvalue vector subscripts and make sure non-lvalue vector subscripts aren't used as lvalues (PR target/63764)

2014-11-20 Thread Richard Henderson
On 11/20/2014 07:09 PM, Jakub Jelinek wrote: Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2014-11-20 Jakub Jelinek ja...@redhat.com PR target/63764 c-family/ * c-common.h (convert_vector_to_pointer_for_subscript): Change return type to bool.

Re: [PATCH] rs6000: Follow up for signed integer overflow fix

2014-11-20 Thread Markus Trippelsdorf
On 2014.11.20 at 19:44 +0100, Jakub Jelinek wrote: On Thu, Nov 20, 2014 at 07:41:43PM +0100, Markus Trippelsdorf wrote: 2014-11-20 Markus Trippelsdorf mar...@trippelsdorf.de * config/rs6000/rs6000.c (includes_rldic_lshift_p): Cast 0 to unsigned. (includes_rldicr_lshift_p):

Re: [PATCH] Fix ICEs in simplify_immed_subreg on OImode/XImode subregs (PR target/63910)

2014-11-20 Thread Richard Sandiford
Jakub Jelinek ja...@redhat.com writes: On Wed, Nov 19, 2014 at 02:23:47PM -0800, Mike Stump wrote: On Nov 19, 2014, at 1:57 PM, Jakub Jelinek ja...@redhat.com wrote: Though, following patch is just fine for me too, I don't think it will make a significant difference: This version is fine

Re: [PATCH] Fix ubsan and C++14 constexpr ICEs (PR sanitizer/63956)

2014-11-20 Thread Marek Polacek
On Thu, Nov 20, 2014 at 06:27:25PM +0100, Jakub Jelinek wrote: On Thu, Nov 20, 2014 at 06:14:52PM +0100, Marek Polacek wrote: + if (!current_function_decl is_ubsan_builtin_p (fun)) +return void_node; + I don't understand the !current_function_decl here. That is because I only

[patch c++]: Fix PR/53904

2014-11-20 Thread Kai Tietz
Hello, this issue fixes a type-overflow issue caused by trying to cast a UHWI via tree_to_shwi. As soon as value gets larger then SHWI_MAX, we get an error for it. So we need to cast it via tree_to_uhwi, and then casting it to the signed variant. ChangeLog 2014-11-20 Kai Tietz

[patch] Flatten streamer header files Pt. 1

2014-11-20 Thread Michael Collison
This is a part one of two part patch that flattens gimple-streamer.h, lto-streamer.h and tree-streamer.h. This work is part of the GCC Re-Architecture effort being led by Andrew MacLeod. In gimple-streamer.h I moved all exports for gimple-streamer-in.c to a new file gimple-streamer-in.h. I

[patch] Flatten streamer header files Pt. 2

2014-11-20 Thread Michael Collison
This is a final part of two part patch that flattens gimple-streamer.h, lto-streamer.h and tree-streamer.h. This patch modifies all source files that previously included the three streamer header files to now include the header file(s) that contains the exports that it needs. I performed

Re: [patch] Flatten streamer header files Pt. 1

2014-11-20 Thread Andrew MacLeod
On 11/20/2014 03:05 PM, Michael Collison wrote: This is a part one of two part patch that flattens gimple-streamer.h, lto-streamer.h and tree-streamer.h. This work is part of the GCC Re-Architecture effort being led by Andrew MacLeod. In gimple-streamer.h I moved all exports for

Re: [patch] Warn on undefined loop exit

2014-11-20 Thread Marek Polacek
On Thu, Nov 20, 2014 at 05:27:35PM +0100, Richard Biener wrote: + if (exit_warned problem_stmts != vNULL) +{ !problem_stmts.empty () /home/marek/src/gcc/gcc/tree-ssa-loop-niter.c: In function ‘void maybe_lower_iteration_bound(loop*)’:

Re: [patch] Warn on undefined loop exit

2014-11-20 Thread Andrew Stubbs
On 20/11/14 16:27, Richard Biener wrote: If it's really duplicated code can you split it out to a function? + if (OPT_Waggressive_loop_optimizations) +{ this doesn't do what you think it does ;) The variable to check is warn_aggressive_loop_optimizations. + if (exit_warned

Re: LTO streaming of TARGET_OPTIMIZE_NODE

2014-11-20 Thread Jan Hubicka
On 11/20/2014 02:20 PM, Richard Biener wrote: On Thu, 20 Nov 2014, Bernd Schmidt wrote: On 11/13/2014 05:06 AM, Jan Hubicka wrote: this patch adds infrastructure for proper streaming and merging of TREE_TARGET_OPTION. This breaks the offloading path via LTO since it introduces an

Re: [PATCH] PR lto/63968: 175.vpr from cpu2000 fails to build with LTO

2014-11-20 Thread Jan Hubicka
Hello. As I reimplemented fibheap to C++ template, Honza told me that replace_key method actually supports just decrement operation. Old implementation suppress any feedback if we try to increase key: fibheap.c: ... /* If we wanted to, we could actually do a real increase by

Re: PATCH, PR 63965, rs6000, add support for scalar floating point in Altivec registers

2014-11-20 Thread Michael Meissner
This patch fixes the failures in the following tests if --with-cpu is not used to set the cpu to cpus with vsx enabled (power7/power8): gcc.target/powerpc/altivec-splat.c gcc.target/powerpc/pr27158.c I have built these patches on power7 systems (default cpu = power7, and power6),

Re: [PATCH 1/2] teach mklog to get name / email from git config when available

2014-11-20 Thread Tom de Vries
On 20-11-14 17:43, Segher Boessenkool wrote: On Thu, Nov 20, 2014 at 05:22:20PM +0100, Tom de Vries wrote: +my $conf = $ENV{HOME}/.mklog; +if (-f $conf) { +open (CONF, $conf) + or die Could not open file '$conf' for reading: $!\n; +while (CONF) { + if

[PATCH 1/2] PR debug/38757 gcc does not emit DW_LANG_C99.

2014-11-20 Thread Mark Wielaard
On Thu, Nov 13, 2014 at 02:19:57PM +0100, Richard Biener wrote: I'm fine with the string solution as well. Just properly transfer whatever info you want through the translation unit decl and LTO stream it. OK, strings it is then. Here are two patches. The first makes the change to the

[PATCH 2/2] PR debug/38757 continued. Handle C11, C++11 and C++14.

2014-11-20 Thread Mark Wielaard
This change depends on the new DWARFv5 constants mentioned in the following draft: http://dwarfstd.org/doc/dwarf5.20141029.pdf gcc/ChangeLog * dwarf2out.c (is_cxx): Add DW_LANG_C_plus_plus_11 and DW_LANG_C_plus_plus_14. (lower_bound_default): Likewise. Plus DW_LANG_C11.

Re: [PATCH] gcc/c-family/c-cppbuiltin.c: Use 20 instead of 18 for the maximized 64-bits integer decimal string length

2014-11-20 Thread Joseph Myers
On Thu, 20 Nov 2014, Chen Gang wrote: OK, thanks. I guess your meaning is: - If the value is small enough to be expressed by type 'int', we should not provide 'LL'. Yes - and values not small enough should probably not be accepted by this function. - If the value is positive number,

Re: [PATCH] OpenACC for C++ front end

2014-11-20 Thread James Norris
Hi! On 11/13/2014 07:02 AM, Jakub Jelinek wrote: On Wed, Nov 05, 2014 at 03:37:08PM -0600, James Norris wrote: 2014-11-05 James Norris jnor...@codesourcery.com Cesar Philippidis ce...@codesourcery.com Thomas Schwinge tho...@codesourcery.com Ilmir Usmanov

Re: [PATCH] gcc/c-family/c-cppbuiltin.c: Use 20 instead of 18 for the maximized 64-bits integer decimal string length

2014-11-20 Thread Chen Gang
OK, thank you for your details description. I shall send patch v2 for it, within this week. Send from Lenovo A788t. Joseph Myers jos...@codesourcery.com wrote: On Thu, 20 Nov 2014, Chen Gang wrote: OK, thanks. I guess your meaning is: - If the value is small enough to be expressed by

[PATCH, rs6000] Fix PR63673 -- missing prototype for vec_vsx_ld/vec_vsx_st

2014-11-20 Thread Bill Schmidt
Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63673 observes that vec_vsx_ld doesn't currently permit the base pointer to have a type of pointer to double, even though this is specified as legal in the GCC user's manual. We do allow a pointer to float, so this is just an oversight. This

Re: [PATCH] OpenACC for C front end

2014-11-20 Thread James Norris
Hi! On 11/13/2014 09:04 AM, Jakub Jelinek wrote: On Wed, Nov 05, 2014 at 03:39:44PM -0600, James Norris wrote: * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels, c_finish_oacc_data): New functions. (handle_omp_array_sections, c_finish_omp_clauses): Handle

Re: [PATCH] rs6000: Follow up for signed integer overflow fix

2014-11-20 Thread David Edelsohn
On Thu, Nov 20, 2014 at 1:58 PM, Markus Trippelsdorf mar...@trippelsdorf.de wrote: On 2014.11.20 at 19:44 +0100, Jakub Jelinek wrote: On Thu, Nov 20, 2014 at 07:41:43PM +0100, Markus Trippelsdorf wrote: 2014-11-20 Markus Trippelsdorf mar...@trippelsdorf.de * config/rs6000/rs6000.c

Re: [PATCH, rs6000] Fix PR63673 -- missing prototype for vec_vsx_ld/vec_vsx_st

2014-11-20 Thread David Edelsohn
On Thu, Nov 20, 2014 at 6:49 PM, Bill Schmidt wschm...@linux.vnet.ibm.com wrote: Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63673 observes that vec_vsx_ld doesn't currently permit the base pointer to have a type of pointer to double, even though this is specified as legal in the GCC

Re: PATCH, PR 63965, rs6000, add support for scalar floating point in Altivec registers

2014-11-20 Thread David Edelsohn
On Thu, Nov 20, 2014 at 4:48 PM, Michael Meissner meiss...@linux.vnet.ibm.com wrote: This patch fixes the failures in the following tests if --with-cpu is not used to set the cpu to cpus with vsx enabled (power7/power8): gcc.target/powerpc/altivec-splat.c

C++ PATCH for c++/63658 (reference non-type template parameters)

2014-11-20 Thread Jason Merrill
My patch for c++/58606 changed the internal representation of reference template arguments to include the dereference in some places, but not enough. Tested x86_64-cp-linux-gnu, applying to trunk and 4.9. commit f7ea463fa794117000ef8495cb87d8c054323c7e Author: Jason Merrill ja...@redhat.com

[PATCH] Fix PR 63952 (Re: [PATCH, ifcvt] Allow CC mode if HAVE_cbranchcc4)

2014-11-20 Thread Ulrich Weigand
Richard Biener wrote: This probably caused bootstrap on s390x-linux to fail as in PR63952 (last checked with rev. 217714). It seems we have both a back-end bug and a middle-end bug here. First of all, this code in optabs.c:prepare_cmp_insn is quite strange: if (GET_MODE_CLASS (mode) ==

[PATCH, combine] Try REG_EQUAL for nonzero_bits

2014-11-20 Thread Zhenqiang Chen
Hi, The patch tries to use REG_EQUAL to get more precise info for nonzero_bits, which helps to remove unnecessary zero_extend. Here is an example when compiling Coremark, we have rtx like, (insn 1244 386 388 47 (set (reg:SI 263 [ D.5767 ]) (reg:SI 384 [ D.5767 ])) 786

[PATCH, nds32] Committed: Complete -march= option design.

2014-11-20 Thread Chung-Ju Wu
Hi, all, When the help option --target-help is issued, the available items for -march=X are supposed to be displayed automatically. We need to complete -march= option design to perform such mechanism. gcc/ChangeLog 2014-11-21 Chung-Ju Wu jasonw...@gmail.com * config/nds32/nds32.opt

Re: [PATCH, nds32] Committed: Complete -march= option design.

2014-11-20 Thread Chung-Ju Wu
2014-11-21 14:33 GMT+08:00 Chung-Ju Wu jasonw...@gmail.com: Hi, all, [snip] gcc/ChangeLog 2014-11-21 Chung-Ju Wu jasonw...@gmail.com * config/nds32/nds32.opt (march): Add help message. Sorry for that I forgot to attach patch file in the previous mail. Best regards, jasonwucj

[PATCH, nds32] Committed: Add missing RTX_FRAME_RELATED_P to set fp_adjust_insn rtx.

2014-11-20 Thread Chung-Ju Wu
Hi, all, There is a wrong CFI info when frame pointer is needed. The root cause is that we forgot to set fp_adjust_insn as RTX_FRAME_RELATED_P rtx. Fix this issue with following patch. gcc/ChangeLog 2014-11-21 Chung-Ju Wu jasonw...@gmail.com * config/nds32/nds32.c

Re: [PATCH] Fix tree-ssa-strlen ICE introduced by r211956 (PR tree-optimization/61773)

2014-11-20 Thread Richard Biener
On November 20, 2014 7:16:04 PM CET, Jakub Jelinek ja...@redhat.com wrote: Hi! Before the r211956 changes, the only places that set si-stmt were required to check that stpcpy has been declared (with the right prototype) to signal the strlen pass that it can use stpcpy for optimization. But

[PATCH, nds32] Committed: Fix CFI info for variadic function arguments.

2014-11-20 Thread Chung-Ju Wu
Hi, all, In nds32 ABI, the vararg arguments are pushed onto stack by callee. However, those registers content are unnecessary to be restored. We need to create an extra register note to inform gcc such information so that it can generate correct CFI info for variadic function. gcc/ChangeLog

Re: [PATCH 1/2] PR debug/38757 gcc does not emit DW_LANG_C99.

2014-11-20 Thread Jakub Jelinek
On Thu, Nov 20, 2014 at 11:30:11PM +0100, Mark Wielaard wrote: --- a/gcc/config/avr/avr-c.c +++ b/gcc/config/avr/avr-c.c @@ -386,7 +386,8 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile) (as mentioned in ISO/IEC DTR 18037; Annex F.2) which is not implemented in GCC up to now.

[PATCH, nds32] Committed: Look into LO_SUM's operand to determine whether it is a valid address.

2014-11-20 Thread Chung-Ju Wu
Hi, all, In the nds32_legitimate_address_p function, we should look into LO_SUM's operand so that we can precisely identify if it is a valid address. This can help to avoid extra move instruction and improve code generation. gcc/ChangeLog 2014-11-21 Chung-Ju Wu jasonw...@gmail.com *

<    1   2