Re: [PATCH] Added the libcilkrts path to linker

2013-11-09 Thread Andreas Schwab
"Iyer, Balaji V" writes: > Hello Everyone, > This patch will pass in "-L" to all the Cilk keywords > testsuite files. This patch should Pass all the Cilk keywords tests failing > in http://gcc.gnu.org/ml/gcc-testresults/2013-11/msg00083.html. Tested no > x86_64 SUSE machine (-m32 and -m6

[wide-int] Remove some debugging code

2013-11-09 Thread Richard Sandiford
Noticed while going through the diff with the merge point. Applied as obvious. Thanks, Richard Index: gcc/tree-ssa-loop-ivopts.c === --- gcc/tree-ssa-loop-ivopts.c 2013-11-09 09:39:18.015741949 + +++ gcc/tree-ssa-loop-ivopts.c

[wide-int] Fix some formatting

2013-11-09 Thread Richard Sandiford
Fix formatting and remove some spurious differences with trunk (some of which are ordering rather than formatting, but it didn't seem worth separating them out). Also put stuff on a single line in cases where shorter wide-int code makes that possible. Applied as obvious (I hope). Richard Index

[wide-int] A few assorted simplifications

2013-11-09 Thread Richard Sandiford
These changes don't have much in common except being simplifications. Note that "len == 0" isn't possible now that we've eliminated the 0-precision case. "val = val" should be redundant. Tested on powerpc64-linux-gnu and by rerunning the assembly comparison. OK to install? Richard Index: gcc/e

[wide-int] Fix comment about GCC_BAD

2013-11-09 Thread Richard Sandiford
There are two instances of: if (TREE_CODE (x) != INTEGER_CST) GCC_BAD ("invalid constant in %<#pragma pack%> - ignored"); /* Cannot use tree_to_uhwi here or it will ice if above message printed. */ align = tree_to_hwi (x); But GCC_BAD includes a return statement. As f

[wide-int] Rename a function to match its type

2013-11-09 Thread Richard Sandiford
wide_int_type_size_in_bits returns an offset_int (previously an addr_int) rather than a wide_int, so this patch renames it accordingly. Tested on powerpc64-linux-gnu and by rerunning the assembly comparison. OK to install? Thanks, Richard Index: gcc/dwarf2out.c =

[wide-int] Make more use of const references

2013-11-09 Thread Richard Sandiford
Some cases where we could use const references instead of passing by value. Tested on powerpc64-linux-gnu and by rerunning the assembly comparison. OK to install? Thanks, Richard Index: gcc/fold-const.c === --- gcc/fold-const.c

[wide-int] Avoid some unnecessary wide_int temporaries

2013-11-09 Thread Richard Sandiford
Avoid some unnecessary "wide_int (x)"s and make more use of wi::. (In the cp/decl.c case the wi:: avoids using HWIs rather than avoiding a wide_int temporary.) As far as the first hunk goes, the trunk code is: unsigned HOST_WIDE_INT bytes; ... if (TREE_CODE (ptr) == ADDR_EXPR) { b

Re: [C++ Patch / RFC] Fixing a diagnostic regression caused by the fix for c++/56930

2013-11-09 Thread Paolo Carlini
... I think that a much better fix would be calling the second cp_convert with tf_none and make sure the information is propagated down to the c-common code emitting the diagnostic. I'm going to work on it. Note anyway that we still have the option of not calling cp_convert when it's not neces

[wide-int] Simplify mult-to-shift conversion

2013-11-09 Thread Richard Sandiford
Trunk expand_mult uses the following code to handle CONST_DOUBLEs: /* If we are multiplying in DImode, it may still be a win to try to work with shifts and adds. */ if (CONST_DOUBLE_HIGH (scalar_op1) == 0 && (CONST_DOUBLE_LOW (scalar_op1) > 0

[wide-int] Simplify div_if_zero_remainder

2013-11-09 Thread Richard Sandiford
wide-int adds some code to div_if_zero_remainder to handle mismatched signs. I think it's trying to make sure that we do the division to "infinite" precision, extending each operand according to its own sign. We can do that more easily using wi::to_widest. Using to::widest should also be chaper.

[wide-int] Use MAX_MODE_INT rather than mode_for_size

2013-11-09 Thread Richard Sandiford
"mode_for_size (MAX_BITSIZE_MODE_ANY_INT, MODE_INT, 0)" isn't safe because the widest mode might not have an integer counterpart. We can get the widest integer mode directly using MAX_MODE_INT. Tested on powerpc64-linux-gnu and by rerunning the assembly comparison. OK to install? Thanks, Richard

[wide-int] Postreload LOAD_EXTEND_OP handling

2013-11-09 Thread Richard Sandiford
LOAD_EXTEND_OP is about extending a subword value to a word. The final wide_int should therefore be word_mode rather than GET_MODE (src). Tested on powerpc64-linux-gnu and by rerunning the assembly comparison. OK to install? Thanks, Richard Index: gcc/postreload.c =

[wide-int] Documentation and comment tweaks

2013-11-09 Thread Richard Sandiford
Some minor tweaks to the documentation and commentary. The hyphenation and "non zero"->"nonzero" changes are supposed to be per guidelines: http://gcc.gnu.org/codingconventions.html#Spelling Hope I got them right. OK to install? This is the last of the patches I had lined up. These patches

[committed] Remove duplicate contents in gcc/config/rs6000/t-xilinx

2013-11-09 Thread Tom de Vries
Michael, This patch removes duplicate contents in gcc/config/rs6000/t-xilinx. Looks like a patch was applied twice. Committed as trivial. Thanks, - Tom 2013-11-08 Tom de Vries * config/rs6000/t-xilinx: Remove duplicate contents. diff --git a/gcc/config/rs6000/t-xilinx b/gcc/config

[patch] fix libstdc++/58982

2013-11-09 Thread Jonathan Wakely
This ensures we do not optimize a std::copy() of trivial types to memmove() if the unoptimized form would be ill-formed because the type isn't assignable, and similarly does not optimize std::uninitialized_xxx() on trivial types to simple assignment when the type isn't assignable. This fixes the r

Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-11-09 Thread Adam Butcher
On 2013-11-08 18:50, Jason Merrill wrote: On 10/31/2013 05:47 AM, Adam Butcher wrote: + become_template = true; + push_deferring_access_checks (dk_deferred); Why is this call here? I don't see anything in the rest of the function that would trigger an access check, or a match

Re: [PATCH C++/testsuite] Remove pchtest check objects and compile with current tool

2013-11-09 Thread Bernhard Reutner-Fischer
On 1 November 2013 02:15, Mike Stump wrote: > On Oct 31, 2013, at 1:47 AM, Bernhard Reutner-Fischer > wrote: >> On 30 October 2013 23:22, Mike Stump wrote: >>> On Oct 30, 2013, at 3:14 PM, Bernhard Reutner-Fischer >>> wrote: On 30 October 2013 22:47, Mike Stump wrote: > > Was th

PR37132 – RFC patch for generation of DWARF symbol for Fortran's namelists (DW_TAG_namelist)

2013-11-09 Thread Tobias Burnus
Hi all, I have a problem generating DW_TAG_namelist dies in conjunction with USE-only association. For a NAMELIST in a module on in a procedure (subroutine, function), one generates a DW_TAG_namelist which contains a list of DW_TAG_namelist_item. (Works, except that gdb doesn't support DW_T

Re: [wide-int] Commit wide-int version of doloop rework

2013-11-09 Thread Richard Sandiford
Mike Stump writes: > On Nov 5, 2013, at 12:00 PM, Richard Sandiford > wrote: >> I've committed the patch below, which is a trivial wide-intification of: >> >>http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00335.html >> >> I won't commit the mainline patch for a couple of days > > So, please f

Re: Some wide-int review comments

2013-11-09 Thread Kenneth Zadeck
On 11/08/2013 05:30 AM, Richard Sandiford wrote: Some comments from looking through the diff with the merge point, ignoring wide-int.h and wide-int.cc. A few more to follow in the form of patchses. dwarf2out.c has: +case CONST_WIDE_INT: + if (mode == VOIDmode) +

Re: [wide-int] Fix comment about GCC_BAD

2013-11-09 Thread Kenneth Zadeck
On 11/09/2013 05:13 AM, Richard Sandiford wrote: There are two instances of: if (TREE_CODE (x) != INTEGER_CST) GCC_BAD ("invalid constant in %<#pragma pack%> - ignored"); /* Cannot use tree_to_uhwi here or it will ice if above message printed. */ align = tree_to_hw

Re: [wide-int] Rename a function to match its type

2013-11-09 Thread Kenneth Zadeck
On 11/09/2013 05:16 AM, Richard Sandiford wrote: wide_int_type_size_in_bits returns an offset_int (previously an addr_int) rather than a wide_int, so this patch renames it accordingly. Tested on powerpc64-linux-gnu and by rerunning the assembly comparison. OK to install? Thanks, Richard Index

[buildrobot] [PATCH] pdp11-aout broken

2013-11-09 Thread Jan-Benedict Glaw
Hi Diego! The recent tree.h refactoring moved a function, but not a #define it was using. This broke pdp11-aout: g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-att

Re: Fix 32-bit __atomic_*_16 problems (hopefully)

2013-11-09 Thread Dominique Dhumieres
> I hope this patch will fix the issues people have seen with atomics > tests failing on 32-bit architectures with missing __atomic_*_16 (or > at least replace them by different problems). I'm running tests on > x86_64-unknown-linux-gnu; perhaps someone seeing the 32-bit problems > could test it t

Re: [wide-int] Make more use of const references

2013-11-09 Thread Kenneth Zadeck
looks good to me. On 11/09/2013 05:17 AM, Richard Sandiford wrote: Some cases where we could use const references instead of passing by value. Tested on powerpc64-linux-gnu and by rerunning the assembly comparison. OK to install? Thanks, Richard Index: gcc/fold-const.c ==

Re: [wide-int] Avoid some unnecessary wide_int temporaries

2013-11-09 Thread Kenneth Zadeck
On 11/09/2013 05:28 AM, Richard Sandiford wrote: Avoid some unnecessary "wide_int (x)"s and make more use of wi::. (In the cp/decl.c case the wi:: avoids using HWIs rather than avoiding a wide_int temporary.) As far as the first hunk goes, the trunk code is: unsigned HOST_WIDE_INT bytes;

Re: [wide-int] Simplify mult-to-shift conversion

2013-11-09 Thread Kenneth Zadeck
On 11/09/2013 05:51 AM, Richard Sandiford wrote: Trunk expand_mult uses the following code to handle CONST_DOUBLEs: /* If we are multiplying in DImode, it may still be a win to try to work with shifts and adds. */ if (CONST_DOUBLE_HIGH (scalar_op1) == 0

Re: [wide-int] Simplify div_if_zero_remainder

2013-11-09 Thread Kenneth Zadeck
On 11/09/2013 05:55 AM, Richard Sandiford wrote: wide-int adds some code to div_if_zero_remainder to handle mismatched signs. I think it's trying to make sure that we do the division to "infinite" precision, extending each operand according to its own sign. We can do that more easily using wi::t

Re: [wide-int] Use MAX_MODE_INT rather than mode_for_size

2013-11-09 Thread Kenneth Zadeck
On 11/09/2013 05:57 AM, Richard Sandiford wrote: "mode_for_size (MAX_BITSIZE_MODE_ANY_INT, MODE_INT, 0)" isn't safe because the widest mode might not have an integer counterpart. We can get the widest integer mode directly using MAX_MODE_INT. Tested on powerpc64-linux-gnu and by rerunning the as

Re: [wide-int] Postreload LOAD_EXTEND_OP handling

2013-11-09 Thread Kenneth Zadeck
On 11/09/2013 05:58 AM, Richard Sandiford wrote: LOAD_EXTEND_OP is about extending a subword value to a word. The final wide_int should therefore be word_mode rather than GET_MODE (src). Tested on powerpc64-linux-gnu and by rerunning the assembly comparison. OK to install? Thanks, Richard In

Re: [wide-int] Documentation and comment tweaks

2013-11-09 Thread Kenneth Zadeck
On 11/09/2013 06:09 AM, Richard Sandiford wrote: Some minor tweaks to the documentation and commentary. The hyphenation and "non zero"->"nonzero" changes are supposed to be per guidelines: http://gcc.gnu.org/codingconventions.html#Spelling Hope I got them right. OK to install? This is th

Simplify code in gimple_equal_p

2013-11-09 Thread Tom de Vries
Richard, This patch simplifies code in gimple_equal_p. Bootstrapped and regtested on x86_64. OK for trunk? Thanks, - Tom 2013-11-06 Tom de Vries * tree-ssa-tail-merge.c (gimple_equal_p): Remove equal variable. diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c inde

Re: Fix 32-bit __atomic_*_16 problems (hopefully)

2013-11-09 Thread Dominique Dhumieres
Typical very long run output: [Book15] f90/bug% gcc49 -std=c11 -pedantic-errors -pthread -D_POSIX_C_SOURCE=200809L /opt/gcc/work/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c -L/opt/gcc/build_w/x86_64-apple-darwin13.0.0/i386/./libatomic/.libs -latomic -m32 [Book15] f90/bug% time a.out

[PATCH] Factor out gimple_dont_merge_p

2013-11-09 Thread Tom de Vries
Richard, This patch factors out gimple_dont_merge_p from gimple_equal_p and find_duplicate. Bootstrapped and regtested on x86_64. OK for trunk? Thanks, - Tom 2013-11-06 Tom de Vries * tree-ssa-tail-merge.c (gimple_dont_merge_p): Factor function out of ... (gimple_

[PATCH] Factor out gimple_operand_equal_value_p from gimple_equal_p

2013-11-09 Thread Tom de Vries
Richard, This patch factors out gimple_operand_equal_value_p from gimple_equal_p. Bootstrapped and regtested on x86_64. OK for trunk? Thanks, - Tom 2013-11-06 Tom de Vries * tree-ssa-tail-merge.c (gimple_operand_equal_value_p): Factor new function out of ... (gimpl

libgo patch committed: Correct flag

2013-11-09 Thread Ian Lance Taylor
In the recent libgo update I used the wrong flag value: FlagNoGC where I should have used FlagNoInvokeGC. This patch fixes the bug. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r d956ad070046 libgo/runtime/malloc.goc --- a/libgo/runtime/malloc.g

Re: [wide-int] Fix some formatting

2013-11-09 Thread Mike Stump
On Nov 9, 2013, at 2:00 AM, Richard Sandiford wrote: > Fix formatting and remove some spurious differences with trunk > (some of which are ordering rather than formatting, but it didn't > seem worth separating them out). > Applied as obvious (I hope). I reviewed it, looks good.

Re: [wide-int] A few assorted simplifications

2013-11-09 Thread Mike Stump
On Nov 9, 2013, at 2:03 AM, Richard Sandiford wrote: > These changes don't have much in common except being simplifications. > Note that "len == 0" isn't possible now that we've eliminated the > 0-precision case. "val = val" should be redundant. > > OK to install? Ok.

[PATCH] Handle GIMPLE_ASSIGNs with different vuse in gimple_equal_p

2013-11-09 Thread Tom de Vries
Richard, Consider the test-case test.c: ... int z; int x; void f (int c, int d) { if (c) z = 5; else { if (d) x = 4; z = 5; } } ... Atm, we don't tail-merge the 'z = 5' blocks, because gimple_equal_p returns false for the 'z = 5' statements. The relevant cod

Re: [wide-int] Fix comment about GCC_BAD

2013-11-09 Thread Mike Stump
On Nov 9, 2013, at 2:13 AM, Richard Sandiford wrote: > There are two instances of: > > if (TREE_CODE (x) != INTEGER_CST) > GCC_BAD ("invalid constant in %<#pragma pack%> - ignored"); > /* Cannot use tree_to_uhwi here or it will ice if above message printed. > */ > align =

Re: [wide-int] Rename a function to match its type

2013-11-09 Thread Mike Stump
On Nov 9, 2013, at 2:16 AM, Richard Sandiford wrote: > wide_int_type_size_in_bits returns an offset_int (previously an addr_int) > rather than a wide_int, so this patch renames it accordingly. > OK to install? Ok.

Re: [wide-int] Make more use of const references

2013-11-09 Thread Mike Stump
On Nov 9, 2013, at 2:17 AM, Richard Sandiford wrote: > Some cases where we could use const references instead of passing by value. > OK to install? Ok.

Re: [wide-int] Avoid some unnecessary wide_int temporaries

2013-11-09 Thread Mike Stump
On Nov 9, 2013, at 2:28 AM, Richard Sandiford wrote: > Avoid some unnecessary "wide_int (x)"s and make more use of wi::. > OK to install? Nice. Ok.

Re: Fix 32-bit __atomic_*_16 problems (hopefully)

2013-11-09 Thread Joseph S. Myers
On Sat, 9 Nov 2013, Dominique Dhumieres wrote: > > I hope this patch will fix the issues people have seen with atomics > > tests failing on 32-bit architectures with missing __atomic_*_16 (or > > at least replace them by different problems). I'm running tests on > > x86_64-unknown-linux-gnu; perh

Re: [wide-int] Use MAX_MODE_INT rather than mode_for_size

2013-11-09 Thread Mike Stump
On Nov 9, 2013, at 2:57 AM, Richard Sandiford wrote: > "mode_for_size (MAX_BITSIZE_MODE_ANY_INT, MODE_INT, 0)" isn't safe > because the widest mode might not have an integer counterpart. > We can get the widest integer mode directly using MAX_MODE_INT. > OK to install? Ah, curious. Ok. Long t

Merge from mainline to gccgo branch

2013-11-09 Thread Ian Lance Taylor
I've merge GCC mainline revision 204617 to the gccgo branch. Ian

Re: [PATCH C++/testsuite] Remove pchtest check objects and compile with current tool

2013-11-09 Thread Mike Stump
On Nov 9, 2013, at 5:34 AM, Bernhard Reutner-Fischer wrote: > Ok for trunk? > 2013-10-12 Bernhard Reutner-Fischer > >* lib/dg-pch.exp (pch-init): Remove pchtest check objects. Ok. The code that does set chk_lang "c++-header", but just not the code that puts in the comment, is fine

Re: [buildrobot] [PATCH] pdp11-aout broken

2013-11-09 Thread Diego Novillo
On Sat, Nov 9, 2013 at 9:43 AM, Jan-Benedict Glaw wrote: > /home/jbglaw/repos/gcc/gcc/cfgexpand.c: In function ‘void > expand_main_function()’: > /home/jbglaw/repos/gcc/gcc/cfgexpand.c:5409:40: error: ‘NAME__MAIN’ was not > declared in this scope Apologies for the breakage. I missed this messa

[patch][RFC] make lra.c:check_rtl set maybe_hot_insn_p

2013-11-09 Thread Steven Bosscher
Hello, This patch is necessary to make ARM pass the test suite with LRA enabled. The symptom is recog failing to recognize a store_minmaxsi insn, see: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg00725.html But I am not sure if that's also the root cause of the problem, or whether the ARM back e

Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-11-09 Thread Adam Butcher
On 2013-11-09 13:21, Adam Butcher wrote: On 2013-11-08 18:50, Jason Merrill wrote: On 10/31/2013 05:47 AM, Adam Butcher wrote: + become_template = true; + push_deferring_access_checks (dk_deferred); Why is this call here? I don't see anything in the rest of the function that

Re: [C++14] implement [[deprecated]].

2013-11-09 Thread Ed Smith-Rowland
On 10/27/2013 05:17 AM, Paolo Carlini wrote: On 10/22/2013 02:28 PM, Ed Smith-Rowland wrote: I think this is pretty easy - gnu::deprecated has the same semantics. Since we decided to have this now, we should also update the docs, thus htdocs/projects/cxx1y.html (which normally would link htdoc

OpenBSD cilkrts portability patch

2013-11-09 Thread John Carr
I am trying to build the trunk version of gcc to have Cilk on OpenBSD. I attach three changes to libcilkrts. Two changes treat OpenBSD like FreeBSD. One change is needed because OpenBSD defines PTHREAD_MUTEX_* as enumerations rather than preprocessor constants. Index: /data/jfc/src/GNU/trunk/li

[wwwdocs] [C++14] Library and front-end additions

2013-11-09 Thread Ed Smith-Rowland
On 10/27/2013 05:17 AM, Paolo Carlini wrote: On 10/22/2013 02:28 PM, Ed Smith-Rowland wrote: I think this is pretty easy - gnu::deprecated has the same semantics. Since we decided to have this now, we should also update the docs, thus htdocs/projects/cxx1y.html (which normally would link htdoc

Re: [C++14] implement [[deprecated]].

2013-11-09 Thread Paolo Carlini
On 11/09/2013 08:59 PM, Ed Smith-Rowland wrote: On 10/27/2013 05:17 AM, Paolo Carlini wrote: On 10/22/2013 02:28 PM, Ed Smith-Rowland wrote: I think this is pretty easy - gnu::deprecated has the same semantics. Since we decided to have this now, we should also update the docs, thus htdocs/proj

Re: [C++ PATCH] Refactor implicit function template implementation and fix 58534, 58536, 58548, 58549 and 58637.

2013-11-09 Thread Jason Merrill
On 11/09/2013 08:21 AM, Adam Butcher wrote: + TYPE_STUB_DECL (t) = TYPE_NAME (t) = TEMPLATE_TYPE_DECL (t); Is this changing anything? I'm not sure if we need to copy the decl or if we can just reuse it, but either way we need to set the type of TEMPLATE_TYPE_DECL (t) to t. I think it (o