Re: [patch] PR 57362

2013-07-09 Thread Jason Merrill
On 06/04/2013 02:55 PM, Sriraman Tallam wrote: Sorry for the long delay. Test case added and patch attached. OK to commit? OK. Jason

Re: Aw: Re: Re: [PATCH] FPU IEEE 754 for MIPS r5900

2013-07-09 Thread Richard Sandiford
"Jürgen Urban" writes: > Hello, >> "Jürgen Urban" writes: >> >> "Jürgen Urban" writes: >> >> > I used the SPU code in GCC as example for creating an >> >> > r5900_single_format structure. The patch is attached to the e-mail. I >> >> > want to submit this patch. >> >> >> >> Thanks. Are there any

[VMS] Update libiberty/makefile.vms

2013-07-09 Thread Tristan Gingold
Add dwarfnames.obj, needed to build binutils on VMS hosts. Committed on both gcc and src trunks. Tristan. libiberty/ 2013-07-09 Tristan Gingold * makefile.vms (OBJS): Add dwarfnames.obj Index: makefile.vms === --- makef

[PING] Two patches pending

2013-07-09 Thread Bin Cheng
Hi, FW: [PATCH GCC]Relax the probability condition in CE pass when optimizing for code size http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00969.html [PATCH ARM]Extend thumb1_reorg to save more comparison instructions http://gcc.gnu.org/ml/gcc-patches/2013-04/msg01057.html Thanks. bin

[PATCH GCC/ARM]Disable "-fira-hoist-pressure" on Thumb2

2013-07-09 Thread Bin Cheng
Hi, For now the option "-fira-hoist-pressure" is enabled for all targets, but I monitored performance regression with Os on thumb2 for some cases. Considering that optimization has small improvement on thumb2 for code size, here comes this patch disabling it on Thumb2 and modifying the correspondin

Re: [patch] regex_traits implementation

2013-07-09 Thread Jonathan Wakely
On 3 July 2013 05:15, Tim Shen wrote: > All fixed. I use `_RegexMask` rather than `const _RegexMask&` just > because, IMO, const reference is for something very large and doesn't > need to be every-byte-accessed. > > Add _RegexMask::_S_valid_mask = 0x3 instead of using the literal everywhere. Sorr

Re: RFC: Add of type-demotion pass

2013-07-09 Thread Kai Tietz
- Original Message - > On Mon, 8 Jul 2013, Kai Tietz wrote: > > > These passes are implementing type-demotion (type sinking into > > statements) for some gimple statements. I limitted inital > > implementation to the set of multiply, addition, substraction, and > > binary-and/or/xor. Add

Re: [PATCH] Teach VRP about __builtin_{ffs,parity,popcount,clz,ctz,clrsb}{,l,ll,imax} (PR target/29776)

2013-07-09 Thread Richard Earnshaw
On 05/07/13 16:01, Jakub Jelinek wrote: Hi! Attached are two versions of a patch to teach VRP about the int bitop builtins. Both patches are identical for all builtins but __builtin_c[lt]z*, which are the only two from these that are documented to have undefined behavior on some argument (0).

Re: [PATCH] Teach VRP about __builtin_{ffs,parity,popcount,clz,ctz,clrsb}{,l,ll,imax} (PR target/29776)

2013-07-09 Thread Jakub Jelinek
On Tue, Jul 09, 2013 at 10:20:18AM +0100, Richard Earnshaw wrote: > On ARM, CLZ has a defined result at zero (32). Furthermore, the > ACLE specification defines (in the header arm_acle.h) __clz(n) as > an intrinsic aimed at the CLZ instruction; __clz() has a defined > result at 0. We want to use

Re: *ping* - Re: [Patch, Fortran] Add end-of-scope finalization (Part 2 of 2)

2013-07-09 Thread Dominique Dhumieres
Dear Tobias, The following patch prevents the warning to generate a FAIL: --- /opt/gcc/_clean/gcc/testsuite/gfortran.dg/class_48.f90 2012-02-05 22:03:27.0 +0100 +++ /opt/gcc/work/gcc/testsuite/gfortran.dg/class_48.f902013-07-01 19:44:06.0 +0200 @@ -158,4 +158,6 @@ c

Re: [Patch, Fortran] PR40276/PR57711 - improve generic diagnostic

2013-07-09 Thread Dominique Dhumieres
Dear Tobias, After this patch several tests related to pr20896 are now rejected, it is probably right to issue an error for them, but I am not sure that the message is right, e.g. ! { dg-do compile } ! Test the fix for PR20896 in which the ambiguous use ! of p was not detected. ! ! Contributed by

Re: [patch] regex_traits implementation

2013-07-09 Thread Tim Shen
On Tue, Jul 9, 2013 at 4:35 PM, Jonathan Wakely wrote: > Sorry for the delay, I missed this latest version - it looks excellent > and is fine to commit. Do you have svn write access or do you need > someone to commit it for you? I don't have svn write access. Should I make a request of it, or ask

Re: [patch] regex_traits implementation

2013-07-09 Thread Jonathan Wakely
On 9 July 2013 11:13, Tim Shen wrote: > On Tue, Jul 9, 2013 at 4:35 PM, Jonathan Wakely wrote: >> Sorry for the delay, I missed this latest version - it looks excellent >> and is fine to commit. Do you have svn write access or do you need >> someone to commit it for you? > > I don't have svn write

Re: [C++ Patch] PR 51786

2013-07-09 Thread Paolo Carlini
On 07/09/2013 05:09 AM, Jason Merrill wrote: On 07/08/2013 07:32 PM, Paolo Carlini wrote: + && (CLASS_TYPE_P (decl_specifiers.type) + || TREE_CODE (decl_specifiers.type) == ENUMERAL_TYPE)) You can use OVERLOAD_TYPE_P here if you want. Ah, I seemed to remember we had something

Re: [patch] regex_traits implementation

2013-07-09 Thread Ed Smith-Rowland
On 07/09/2013 06:17 AM, Jonathan Wakely wrote: On 9 July 2013 11:13, Tim Shen wrote: On Tue, Jul 9, 2013 at 4:35 PM, Jonathan Wakely wrote: Sorry for the delay, I missed this latest version - it looks excellent and is fine to commit. Do you have svn write access or do you need someone to commi

Re: MIPS don't gererate MUL when muliplying by constant of for 2^N +/- 1 optimizing for size

2013-07-09 Thread Graham Stott
hi Richard, I've Updated patch and added testcases basically they are the same testcase just using different constants I tried combining  them into one testcase couldn'tget the scan-assembler stuff working when multiple functions were in the assembler output I couldn't couldn't work out ho

Re: MIPS elimate trap-if-zero instruction if possible for divisions

2013-07-09 Thread Graham Stott
Hi Richard, Jeff. Richard what's your idea for exposing things early enough so that VRP can eliminate the need for a trao-if-zero insn iif possible. Graham

Re: [PATCH] Teach VRP about __builtin_{ffs,parity,popcount,clz,ctz,clrsb}{,l,ll,imax} (PR target/29776)

2013-07-09 Thread Joseph S. Myers
On Tue, 9 Jul 2013, Richard Earnshaw wrote: > On ARM, CLZ has a defined result at zero (32). Furthermore, the ACLE > specification defines (in the header arm_acle.h) __clz(n) as an intrinsic > aimed at the CLZ instruction; __clz() has a defined result at 0. We want to > use __builtin_clz as the

[ping] Re: [patch 0/4] reimplement -fstrict-volatile-bitfields, v3

2013-07-09 Thread Sandra Loosemore
On 06/30/2013 09:24 PM, Sandra Loosemore wrote: Here is my third attempt at cleaning up -fstrict-volatile-bitfields. Ping? Part 1 removes the warnings and packedp flag. It is the same as in the last version, and has already been approved. I'll skip reposting it since the patch is here alrea

[patch, mips] Size optimization for MIPS

2013-07-09 Thread Steve Ellcey
While doing some size measurements and optimization I found that using the t0 through t7 registers on MIPS in MIPS16 mode resulted in larger code. This is because you cannot actually do any operations on these registers in MIPS16 mode but can only move data to or from them. Compiling libraries l

Re: [patch, mips] Size optimization for MIPS

2013-07-09 Thread Richard Henderson
On 07/09/2013 09:29 AM, Steve Ellcey wrote: > + /* In MIPS16 mode using the $t registers for reload results in code > + that is larger (and slightly faster) then if we do not use them so > + if optimizing for size, do not use them. */ > + if (optimize_size) > + { > +

Re: [gomp4] Compiler side of the cancellation support

2013-07-09 Thread Richard Henderson
On 07/03/2013 03:39 AM, Jakub Jelinek wrote: > Hi! > > This is the compiler side of the #pragma omp cancel and #pragma omp > cancellation point support. On the library side what is needed is: > 1) GOMP_cancellation_point now returns a bool (whether the relevant >cancellation was observed) > 2

Re: [patch, mips] Size optimization for MIPS

2013-07-09 Thread Richard Sandiford
"Steve Ellcey " writes: > While doing some size measurements and optimization I found that using the > t0 through t7 registers on MIPS in MIPS16 mode resulted in larger code. This > is because you cannot actually do any operations on these registers in MIPS16 > mode but can only move data to or

C++ PATCH for c++/57831 (ICE with using-declaration and qualified-id in template)

2013-07-09 Thread Jason Merrill
Here instantiating the SCOPE_REF didn't know how to handle seeing a USING_DECL for the name. The right answer is to strip the USING_DECL and return the identifier, as we do in other cases. Tested x86_64-pc-linux-gnu, applying to trunk, 4.8 and 4.7. commit 1d678e7704b74e7dfc0c927c47a0271c8d599b

Re: MIPS elimate trap-if-zero instruction if possible for divisions

2013-07-09 Thread Richard Sandiford
Graham Stott writes: > Hi Richard, Jeff. > > Richard what's your idea for exposing things early enough so that VRP > can eliminate the need for a trao-if-zero insn iif possible. Well, I was thinking of doing it in expand. I.e. get the MIPS div*, mod* and divmod* patterns to emit an explicit trap

Re: MIPS don't gererate MUL when muliplying by constant of for 2^N +/- 1 optimizing for size

2013-07-09 Thread Richard Sandiford
Graham Stott writes: >     gcc/ChangeLog > >     * config/mips/mips.c (): Very slightly increase code of MUL.whren > optimizing for size. * config/mips/mips.c (mips_rtx_costs): Very slightly increase the cost of MULT when optimizing for size. >    gcc/testsuite/ChangeLog >     *

C++ PATCH for c++/57551 (ICE with undefined constant expression)

2013-07-09 Thread Jason Merrill
In this testcase, we were assuming that if we have an INDIRECT_REF of an ADDR_EXPR where the address operand has the same type as the ref, we should have been able to fold that away. We were applying this assumption to the offset case as well, for arrays. But in this testcase we're indexing o

Re: MIPS elimate trap-if-zero instruction if possible for divisions

2013-07-09 Thread Graham Stott
Richard, Isn't that to late for VRP its run twice before expand pass. Graham

Re: MIPS elimate trap-if-zero instruction if possible for divisions

2013-07-09 Thread Richard Sandiford
Graham Stott writes: > Isn't that to late for VRP its run twice before expand pass. Exactly why I said: With Jeff's comment about VRP though, it sounds like he had different ideas :-) I suggested expand because I'd have expected the rtl optimisers to deal with the cases your patterns were

Re: MIPS don't gererate MUL when muliplying by constant of for 2^N +/- 1 optimizing for size

2013-07-09 Thread Graham Stott
Richard, I'll renumber then consecutively and fix the typo and change log entry before I commit Thanks Graham - Original Message - From: Richard Sandiford To: Graham Stott Cc: "gcc-patches@gcc.gnu.org" Sent: Tuesday, 9 July 2013, 18:31 Subject: Re: MIPS don't gererate MUL when mu

C++ PATCH for c++/57545 (ICE with -g and non-type template parameter)

2013-07-09 Thread Jason Merrill
This is an instance where we were failing to canonicalize a template argument: for an integer constant, we need to make sure that it has the type of the template parameter, rather than possibly a typedef local to another template. Tested x86_64-pc-linux-gnu, applying to trunk, 4.8, 4.7. commit

C++ PATCH for c++/57532 (bogus error with int() & int())

2013-07-09 Thread Jason Merrill
In C++98 mode we were complaining about trying to apply a ref-qualifier to the function type int() during tentative parsing; the easiest fix is just not to try to tentatively parse ref-qualifiers in C++98 mode, which also lets us fail the tentative parse faster. Tested x86_64-pc-linux-gnu, app

C++ PATCH for c++/57437 (wrong code with mutable lambda)

2013-07-09 Thread Jason Merrill
Here, we were wrongly treating a lambda capture proxy as a local variable for the purpose of C++11 return by move. Fixed by preventing it for proxy variables of all kinds. Tested x86_64-pc-linux-gnu, applying to trunk, 4.8, 4.7. commit a7dc31796b5a7aab2818fa9cb7e0f345ecc8fdf0 Author: Jason Mer

C++ PATCH for c++/57526 (ICE with capture of auto* variable)

2013-07-09 Thread Jason Merrill
An earlier patch of mine changed lambda_capture_field_type to avoid building a DECLTYPE_TYPE in cases where it isn't really necessary, but it is necessary in the case of capture of an auto variable. Tested x86_64-pc-linux-gnu, applying to trunk and 4.8. commit 7d406a5c27c48d1d8fe3b182af72e656c8

C++ PATCH for c++/57658 (ICE with decltype of captured variable)

2013-07-09 Thread Jason Merrill
I've recently adjusted finish_id_expression to return the identifier for various uses of outer local variables that aren't captures. This is another. Tested x86_64-pc-linux-gnu, applying to trunk. commit a9fe694d4756d7cd35a35c4fd8f0dd09543ba559 Author: Jason Merrill Date: Mon Jul 8 23:43:23

Re: RFA: PATCH to restore old behavior of debug_vec_tree

2013-07-09 Thread Lawrence Crowl
On 7/8/13, Jason Merrill wrote: > Lawrence's overhaul of the debug() functions changed the behavior of the > pvt macro in gdbinit.in. Previously it used print_node to dump each of > the elements of the vector, but after the change it uses debug, which > both prints less information by default and

[patch] fix libgcc configure for powerpc-*-eabispe

2013-07-09 Thread Janis Johnson
Tests for powerpc-none-eabispe fail with lots of undefined symbols for _*_df and for __extendsfdf2, __make_fp, and __unordsf2. This patch includes float support in libgcc for the target and eliminates those test failures. OK for mainline and the 4.8 branch? Tested with a cross build of powerpc-n

Re: [patch] fix libgcc configure for powerpc-*-eabispe

2013-07-09 Thread David Edelsohn
On Tue, Jul 9, 2013 at 4:23 PM, Janis Johnson wrote: > Tests for powerpc-none-eabispe fail with lots of undefined symbols for > _*_df and for __extendsfdf2, __make_fp, and __unordsf2. This patch > includes float support in libgcc for the target and eliminates those > test failures. > > OK for mai

Fwd: Resolving an issue of bootstrap failure from vectorization.

2013-07-09 Thread Cong Hou
Repost to gcc-pa...@gcc.gnu.org. -- Forwarded message -- From: Cong Hou Date: Tue, Jul 9, 2013 at 1:10 PM Subject: Resolving an issue of bootstrap failure from vectorization. To: g...@gcc.gnu.org Cc: David Li Hi My name is Cong Hou, and I am a Noogler working in the compiler

Ping Re: [PATCH, rs6000] PR target/57150, do not use VSX instructions for long double caller saves

2013-07-09 Thread Joseph S. Myers
Ping. This patch is pending review. -- Joseph S. Myers jos...@codesourcery.com

Re: Resolving an issue of bootstrap failure from vectorization.

2013-07-09 Thread Xinliang David Li
You found the root cause of the bootstrap profile with vectorizer turned on, but the patch does not look correct to me. The sorting needs to make sure accesses with the same (base, size, offset, step, r_w_kind) are placed together (see how the sorted array is used to build the interleaving chain).

C++ PATCH for c++/57471 (bogus error with sizeof...)

2013-07-09 Thread Jason Merrill
For some reason, the parser leaves parser->scope et al filled after the constructs that the explicit scopes apply to, and rely on later bits to clear them. So we need to do that here. Tested x86_64-pc-linux-gnu, applying to trunk. commit 8b67a328cf8c69484d8971aededb22ca0de0b129 Author: Jason M

Re: [PATCH, rs6000] PR target/57150, do not use VSX instructions for long double caller saves

2013-07-09 Thread David Edelsohn
On Wed, Jul 3, 2013 at 12:09 PM, Joseph S. Myers wrote: > On Fri, 3 May 2013, Michael Meissner wrote: > >> 2013-05-03 Michael Meissner >> >> PR target/57150 >> * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Use DFmode >> to save TFmode registers and DImode to save TIm

Re: [patch, mips] Size optimization for MIPS

2013-07-09 Thread Steve Ellcey
On Tue, 2013-07-09 at 18:25 +0100, Richard Sandiford wrote: > > That was always the case though. These registers weren't enabled because > you can do operations on them. They were enabled because they should make > ideal spill space. Moves to and from these registers always take 2 bytes, > whe

Re: MIPS elimate trap-if-zero instruction if possible for divisions

2013-07-09 Thread Jeff Law
On 07/09/2013 11:28 AM, Richard Sandiford wrote: Graham Stott writes: Hi Richard, Jeff. Richard what's your idea for exposing things early enough so that VRP can eliminate the need for a trao-if-zero insn iif possible. Well, I was thinking of doing it in expand. I.e. get the MIPS div*, mod*

Re: [PATCH] Fix the bug to check if lookup_stmt_eh_lp returns positive instead of non-zero

2013-07-09 Thread Dehao Chen
I tried to make a small testcase to reproduce this. But the GCC EH handling of ERT_MUST_NOT_THROW is not working properly. In my unittest, it will not set this flag to the destructor... Thus the problem cannot be reproduced. Dehao On Mon, Jul 8, 2013 at 9:33 PM, Xinliang David Li wrote: > Is it

Re: RFC: Add of type-demotion pass

2013-07-09 Thread Jeff Law
On 07/08/2013 02:52 PM, Marc Glisse wrote: I wonder why you implemented this as a separate pass instead of adding it to tree-ssa-forwprop. demote_cast is (or should be) a special case of combine_conversions, so it would be nice to avoid the code duplication (there is also a version in fold-const

Re: [PATCH 1/6] Andes nds32: configure settings for nds32 target.

2013-07-09 Thread Joseph S. Myers
On Mon, 8 Jul 2013, Chung-Ju Wu wrote: > + nds32*-*-*) > + supported_defaults="arch nds32_lib" > + > + # process --with-arch > + # the 'with_arch' will be analyzed and then set its ISA and > FLAGS I don't think this approach for processing --with-arch and

Restore cr16-elf

2013-07-09 Thread Jan-Benedict Glaw
Hi! I just tried to build cr16-elf, which fails due to a dependency problem: `gencodes' is needed to build insn-codes.h, but for building it, target.h is included in cr16-protos.h, which in turn includes insn-codes.h: [...] g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fn

Re: [PATCH 2/6] Andes nds32: machine description of nds32 porting (1).

2013-07-09 Thread Joseph S. Myers
On Mon, 8 Jul 2013, Chung-Ju Wu wrote: > +/* > */ > + > +/*++* > + *||* > + *| T

Re: [PATCH 2/6] Andes nds32: machine description of nds32 porting (2).

2013-07-09 Thread Joseph S. Myers
On Mon, 8 Jul 2013, Chung-Ju Wu wrote: > +/* This is used to identify used ISA when doing code generation. > + Initialize it with macro TARGET_DEFAULT_ISA, > + which is defined in nds32-isa-xxx.h file. > + User can specify it by using '-misa=X' option. */ > +enum nds32_isa nds32_selected_is

Re: Restore cr16-elf

2013-07-09 Thread Jan-Benedict Glaw
On Wed, 2013-07-10 01:05:21 +0200, Jan-Benedict Glaw wrote: [...] The email address listed in MAINTAINERS for the person who submitted this port, Jayant Sonar , bounces, though. MfG, JBG -- Jan-Benedict Glaw jbg...@lug-owl.de +49-172-7608481 Signature of:

[C++ Patch] PR 57869

2013-07-09 Thread Paolo Carlini
Hi, Daniel noticed that, per to the resolution of DR195, we shouldn't warn in c++11 mode, not even with -pedantic, for this kind of reinterpret_cast (*). Straightforward change tested x86_64-linux, not sure if we want to do something slightly different for C++98, or something more. Thanks,

Re: [PATCH 2/6] Andes nds32: machine description of nds32 porting (3).

2013-07-09 Thread Joseph S. Myers
The nds32_intrinsic.h header, being installed for users to use, should have the libgcc license exception. You shouldn't need the separate t-mlibs-* files for each default endianness. Just list both options in MULTILIB_OPTIONS, then define MULTILIB_DEFAULTS appropriately depending on the defaul

Re: [PATCH 3/6] Andes nds32: libgcc of nds32 porting.

2013-07-09 Thread Joseph S. Myers
There are lots of files in this patch with no copyright or license notices. GNU policy is that every file of more than ten lines needs copyright and license notices (with the libgcc license exception in this case), or a notice that the file is in the public domain. License notices should be GP

Re: [PATCH 4/6] Andes nds32: testsuite modifications for nds32 target.

2013-07-09 Thread Joseph S. Myers
On Mon, 8 Jul 2013, Chung-Ju Wu wrote: > * gcc.dg/ucnid-11.c: Skip for nds32*-*-*. > * gcc.dg/ucnid-2.c: Skip for nds32*-*-*. > * gcc.dg/ucnid-3.c: Skip for nds32*-*-*. Skipping these tests seems dubious - you should fix the assembler bug that it fails to support extended ident

Re: [PATCH 5/6] Andes nds32: documentation for nds32 target.

2013-07-09 Thread Joseph S. Myers
Don't you have built-in functions to document as well? Use "@:" (or a comma) after "i.e." in Texinfo sources. The range "16-47" should use an en dash (so "16--47"). -- Joseph S. Myers jos...@codesourcery.com

C++ PATCH for c++/57402 (ICE with VLA initialization)

2013-07-09 Thread Jason Merrill
build_vec_init wasn't handling VLAs very well. Tested x86_64-pc-linux-gnu, applying to trunk. commit 8c0d85d60fa6e49ce4c8ac0eae88b77b4edd98fa Author: Jason Merrill Date: Tue Jul 9 18:38:13 2013 -0400 PR c++/57402 * init.c (build_vec_init): Don't take shortcuts when initializing

Re: [C++ Patch] PR 57869

2013-07-09 Thread Jason Merrill
On 07/09/2013 07:46 PM, Paolo Carlini wrote: Daniel noticed that, per to the resolution of DR195, we shouldn't warn in c++11 mode, not even with -pedantic, for this kind of reinterpret_cast (*). Straightforward change tested x86_64-linux, not sure if we want to do something slightly different for

Re: Restore cr16-elf

2013-07-09 Thread Jeff Law
On 07/09/2013 05:05 PM, Jan-Benedict Glaw wrote: Hi! I just tried to build cr16-elf, which fails due to a dependency problem: `gencodes' is needed to build insn-codes.h, but for building it, target.h is included in cr16-protos.h, which in turn includes insn-codes.h: [...] g++ -c -g -O2 -DIN_G

Re: [PATCH] Fix raw-string handling (PR preprocessor/57620)

2013-07-09 Thread Jason Merrill
It seems undesirable to go from one to four separate copies of the note-handling code. Could we instead handle the different states of prefix, body and suffix parsing in local variables and just have one loop over the characters/notes in the input? Jason

Re: [PATCH] Allow raw-string literals in macro arguments and deferred pragmas (PR preprocessor/57824)

2013-07-09 Thread Jason Merrill
On 07/05/2013 11:19 AM, Jakub Jelinek wrote: Seems for deferred_pragmas it just works Can we encounter a newline in a deferred pragma? and for parsing of arguments also if there is something in the current buffer (otherwise would that just mean and of say include? I think raw strings shouldn'

Re: [PATCH] Fix up preprocessing of raw-string literals

2013-07-09 Thread Jason Merrill
On 07/05/2013 11:22 AM, Jakub Jelinek wrote: - if (token->type == CPP_COMMENT) + if (cpp_token_val_index (token) == CPP_TOKEN_FLD_STR) This could use a comment explaining why checking for CPP_TOKEN_FLD_STR does what you want. OK with that change. Jason

Re: [PATCH] Fix preprocessing of string literals for C++11 (PR preprocessor/57757)

2013-07-09 Thread Jason Merrill
OK. Jason