Re: [patch][i386] Remove some dead code (TARGET_BRANCH_PREDICTION_HINTS)

2012-07-09 Thread Uros Bizjak
Hello! > TARGET_BRANCH_PREDICTION_HINTS isn't used at all. This patch removes it. > Bootstrapped&tested (incl. -m32) on x86_64-unknown-linux-gnu. OK for trunk? This infrastructure can be used for future targets, so let's leave it as is. Uros.

[patch][i386] Remove some dead code (TARGET_BRANCH_PREDICTION_HINTS)

2012-07-09 Thread Steven Bosscher
Hello, TARGET_BRANCH_PREDICTION_HINTS isn't used at all. This patch removes it. Bootstrapped&tested (incl. -m32) on x86_64-unknown-linux-gnu. OK for trunk? Ciao! Steven * final.c (final_forward_branch_p): Remove. * output.h (final_forward_branch_p): Remove prototype. * co

[RS6000] offset addressing

2012-07-09 Thread Alan Modra
Hi David, I've been auditing rs6000.c after looking at https://bugzilla.redhat.com/show_bug.cgi?id=837630 We have problems all over the place. :-( For starters, this code in rs6000_legitimate_offset_address_p. case TFmode: ... case TDmode: case TImode: if (mode == TFmod

Re: [patch] Add a lexical block only when the callsite has source location info

2012-07-09 Thread Xinliang David Li
Is this related to the problem described in http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01511.html ? David On Mon, Jun 25, 2012 at 4:43 AM, Dehao Chen wrote: > During function inlining, a lexical block is added for each cloned > callee, and source info is attached to this block for addr2line to

Re: [PATCH, Android] Runtime stack protector enabling for Android target

2012-07-09 Thread Uros Bizjak
On Tue, Jul 10, 2012 at 12:40 AM, Maxim Kuvyrkov wrote: > On 10/07/2012, at 8:51 AM, Igor Zamyatin wrote: > >> Let's try with this patch then. Is it ok for trunk after all >> appropriate testing is done? > > Sorry for the late reply, I've been down with a virus last week. > > Uros, > > Would you p

C++ PATCH for c++/53733 (DR 1402, deleting move ctor)

2012-07-09 Thread Jason Merrill
Apparently we need to implement DR 1402 in 4.7 in order to fix the std::pair ABI breakage properly. So here it is: if overload resolution chooses a non-trivial copy constructor, instead of causing the move constructor to be deleted, we just don't implicitly declare it. Tested x86_64-pc-linux-

Re: New option to turn off stack reuse for temporaries

2012-07-09 Thread Jason Merrill
This looks fine to me, if nobody has any more objections. Jason

Re: [SH] Test case for PR 53886

2012-07-09 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch adds a c.torture/compile test case for PR 53886. > The test case is a slightly modified version of the preprocessed example > in the PR (added forward decls to remove warnings). > > Tested on rev 189361 with > make check-gcc RUNTESTFLAGS="compile.exp=pr53886.

Re: [PATCH, Android] Runtime stack protector enabling for Android target

2012-07-09 Thread Maxim Kuvyrkov
On 10/07/2012, at 8:51 AM, Igor Zamyatin wrote: > Let's try with this patch then. Is it ok for trunk after all > appropriate testing is done? Sorry for the late reply, I've been down with a virus last week. Uros, Would you please approve this patch for i386 provided my review below? > > Chang

Re: [SH] Fix for PR 53886

2012-07-09 Thread Kaz Kojima
Oleg Endo wrote: > This time with the right patch attached. Sorry. > > On Mon, 2012-07-09 at 21:09 +0200, Oleg Endo wrote: >> Hello, >> >> The attached patch is a fix for PR 53886, as suggested in the PR. >> I've also replaced another unchecked usage of 'PATTERN (NEXT_INSN >> (PREV_INSN (insn))

[SH] Fix for PR 53886

2012-07-09 Thread Oleg Endo
This time with the right patch attached. Sorry. On Mon, 2012-07-09 at 21:09 +0200, Oleg Endo wrote: > Hello, > > The attached patch is a fix for PR 53886, as suggested in the PR. > I've also replaced another unchecked usage of 'PATTERN (NEXT_INSN > (PREV_INSN (insn)))' in 'find_barrier', just in

Re: [C++ Pubnames Patch] Anonymous namespaces enclosed in named namespaces. (issue6343052)

2012-07-09 Thread Sterling Augustine
Committed as posted. Thanks. On Sun, Jul 1, 2012 at 7:33 AM, Gabriel Dos Reis wrote: > On Thu, Jun 28, 2012 at 12:50 PM, Sterling Augustine > wrote: >> The enclosed patch adds a fix for the pubnames anonymous namespaces contained >> within named namespaces, and adds an extensive test for the va

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-07-09 Thread Xinliang David Li
Ok. Do you have specific comments on the patch? thanks, David On Sun, Jul 8, 2012 at 4:20 AM, Jason Merrill wrote: > On 07/07/2012 08:38 PM, Xinliang David Li wrote: >>> >>> It seems to me that what you have here are target-specific attributes >>> that >>> affect the signature of a function su

Re: User directed Function Multiversioning via Function Overloading (issue 5752064)

2012-07-09 Thread davidxl
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraph.c File gcc/cgraph.c (right): http://codereview.appspot.com/5752064/diff/51001/gcc/cgraph.c#newcode1282 gcc/cgraph.c:1282: is needed as the address can be used to do an indirect call. */ Extend the comment here. http://codereview.appsp

Re: [PATCH, Android] Runtime stack protector enabling for Android target

2012-07-09 Thread Igor Zamyatin
Let's try with this patch then. Is it ok for trunk after all appropriate testing is done? ChangeLog: 2012-07-09 Sergey Melnikov * config/i386/i386.md (stack_protect_set): Disable the pattern for Android since Android libc (bionic) does not provide random value for sta

Re: Tree tail merging breaks __builtin_unreachable optimization

2012-07-09 Thread Ulrich Weigand
Tom de Vries wrote: > 2012-07-06 Tom de Vries > Richard Guenther > > * tree-ssa-ccp.c (optimize_unreachable): New function. > (execute_fold_all_builtins): Use optimize_unreachable to optimize > BUILT_IN_UNREACHABLE. Don't optimize after BUILT_IN_UNREACHABLE. > >

PR 51094 - fprint_w() in output_addr_const() reinstated

2012-07-09 Thread Dimitrios Apostolou
Since output_addr_const() shows pretty hot in the compiler, I reinstated the fprint_w() call in place of fprintf(). This patch relies on two things: 2's complement representation for negative int and that HOST_WIDE_INT is at least as large type as long for all platforms (will it always be?).

Re: [RFA libiberty, gdb] Add hashtab support to filename_ncmp.c and use it in gdb.

2012-07-09 Thread Doug Evans
[- gdb, + gdb-patches] On Mon, Jul 9, 2012 at 11:51 AM, Steven Bosscher wrote: > On Mon, Jul 9, 2012 at 8:10 PM, Doug Evans wrote: >> Hi. >> >> filename_seen in gdb does a linear search, this patch changes it >> to use a hash table. >> >> Ok to check in? > > Why not just use htab_hash_string? Th

[SH] Test case for PR 53886

2012-07-09 Thread Oleg Endo
Hello, The attached patch adds a c.torture/compile test case for PR 53886. The test case is a slightly modified version of the preprocessed example in the PR (added forward decls to remove warnings). Tested on rev 189361 with make check-gcc RUNTESTFLAGS="compile.exp=pr53886.c --target_board=sh-s

[SH] Fix for PR 53886

2012-07-09 Thread Oleg Endo
Hello, The attached patch is a fix for PR 53886, as suggested in the PR. I've also replaced another unchecked usage of 'PATTERN (NEXT_INSN (PREV_INSN (insn)))' in 'find_barrier', just in case. Tested on rev 189361 with make -k check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-

Re: [RFA libiberty, gdb] Add hashtab support to filename_ncmp.c and use it in gdb.

2012-07-09 Thread Steven Bosscher
On Mon, Jul 9, 2012 at 8:10 PM, Doug Evans wrote: > Hi. > > filename_seen in gdb does a linear search, this patch changes it > to use a hash table. > > Ok to check in? Why not just use htab_hash_string? The file name canonicalization can be put in gdb itself. Ciao! Steven

[RFA libiberty, gdb] Add hashtab support to filename_ncmp.c and use it in gdb.

2012-07-09 Thread Doug Evans
Hi. filename_seen in gdb does a linear search, this patch changes it to use a hash table. Ok to check in? I couldn't think of a good reason to put filename_hash,filename_eq in gdb, and I like placing them close to where hashtab.c and filename_cmp are defined. I also couldn't think of a sufficien

Re: New option to turn off stack reuse for temporaries

2012-07-09 Thread Xinliang David Li
Ping .. On Wed, Jul 4, 2012 at 8:01 AM, Xinliang David Li wrote: > Comment? > > David > > On Mon, Jul 2, 2012 at 4:30 PM, Xinliang David Li wrote: >> I extended the patch a little so that the option can be used to set >> multiple stack reuse levels: -fstack-reuse=[all|name_vars|none] >> >> all:

Re: [C++ RFC / Patch] PR 51213 ("access control under SFINAE")

2012-07-09 Thread Jason Merrill
On 07/02/2012 09:47 PM, Jason Merrill wrote: FAIL: g++.dg/template/friend13.C -std=c++11 (test for excess errors) OK, the problem here is that we need to look up Outer::Inner in order to generate the declaration of foo, and we can't check whether foo is a friend of Outer until after we've com

Re: [wwwdocs] Update coding conventions for C++

2012-07-09 Thread Lawrence Crowl
On 7/4/12, Jason Merrill wrote: > On 07/03/2012 04:37 PM, Lawrence Crowl wrote: >> On 7/1/12, Jason Merrill wrote: >>> As discussed, I would say that RTTI is currently not permitted >>> but could be added later. >> >> But isn't "could be added later" always true? Other folks have >> objected to

Re: [testsuite] backport cleanups to 4.7

2012-07-09 Thread Janis Johnson
On 07/06/2012 11:27 AM, Janis Johnson wrote: > Between June 12 and June 28 I checked in lots of GCC testsuite patches > to individual tests and to test infrastrure files to eliminate > non-unique lines in test summaries, as well as a few related cleanups. > May I backport those to GCC 4.7? It's be

Re: Added better handling of outdated profile data. (issue 5989046)

2012-07-09 Thread Steven Bosscher
On Mon, Jul 9, 2012 at 3:23 PM, wrote: > I also filed a bug here: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53547 Why are you compiling from a different source code base with profile-use than with profile-generate? I'm surprised this works at all, I would have expected GCC to just bail out.

C++ PATCH for c++/53882 (ICE with bind, nullptr and -O)

2012-07-09 Thread Jason Merrill
We also need to handle NULLPTR_TYPE in type_contains_placeholder. While I was at it, I added a NULLPTR_TYPE case to type_hash_eq just in case. Tested x86_64-pc-linux-gnu, applying to trunk and 4.7. commit 05eb87b7123c9161268a0ef89b160c489a3d4935 Author: Jason Merrill Date: Mon Jul 9 15:39:06

[Ada] Action callback gets the project with sources

2012-07-09 Thread Arnaud Charlet
For aggregate projects and aggregate libraries we may have multiple references of the same project. Only one is properly initialized and can be iterated to get the corresponding sources. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-09 Pascal Obry * prj.adb (For_Every_Proj

Re: Added better handling of outdated profile data. (issue 5989046)

2012-07-09 Thread asharif
On 2012/04/24 22:14:17, asharif wrote: Ping? Ping. I also filed a bug here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53547 Here is the formatted ChangeLog in case you want a summary of what I did: * gcc/ipa-inline.c (edge_badness): Make sure profile is valid before using it to compute

[Ada] Prevent mispelling error messages

2012-07-09 Thread Arnaud Charlet
Prevent mispelling error messages with internal attribute names CPU, Dispatching_Domain and Interrupt_Priority. For example: -- Source -- pragma Ada_2012; procedure P is X : Integer; for X'CPU use 3; -- unrecognized attribute (internal to GNAT) for X'CPUX us

[Ada] Fix run-time restrictions dependency

2012-07-09 Thread Arnaud Charlet
This is the first step in dealing with the undesirable linkage between restrictions at compile/bind time (Rident), and restrictions accessible at run-time (System.Rident). This update stops the compiler from withing system.rident. No test, since no functional change. The general problem here is th

[Ada] Lock_Free implementation for protected object

2012-07-09 Thread Arnaud Charlet
This patch reorganizes the Lock_Free restrictions. The compiler issues a warning whenever a Priority aspect/pragma is given while the lock-free implementation has been forced by an aspect/pragma. -- Source -- package T is protected type P1 with Lock_Free is

[Ada] Remove code to emulate RM D.2.3(5/2) semantics on Windows

2012-07-09 Thread Arnaud Charlet
The run time contained code which tried to rearrange the ready queue in order to achieve Annex D semantics. This code was not very efficient, and it did not work with multiprocessors. We consider that we should live with standard Windows semantics. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Proper handling of meaningless size clauses

2012-07-09 Thread Arnaud Charlet
This patch fixes an internal overflow when computing the alignment of a record component whose size is improperly specified as larger than the largest integer value. Compiling the following must yield: prob.adb:6:38: warning: 4294967168 bits of "Unsigned_Integer_4" unused prob.adb:13:45: size for

[Ada] Ada.Streams.Stream_IO is preelaborated

2012-07-09 Thread Arnaud Charlet
AI05-0283 requires Ada.Streams.Stream_IO to be declared with a pragma Preelaborate, so that it can be used by other preelaborated units as well as by Remote_Types and Remote_Call_Interface units. The pragma has been added to that package along with several other GNAT library units on which it depe

[Ada] Rewrite CleanupUnwind_Handler to strictly follow ia64 ABI

2012-07-09 Thread Arnaud Charlet
Required when the unwinder is not the libgcc one (eg: on HP-UX). No functionnal change. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-09 Tristan Gingold * a-exexpr-gcc.adb (CleanupUnwind_Handler): Now imported from raise-gcc.c * raise-gcc.c (__gnat_cleanupu

[PATCH] Fix PR53898

2012-07-09 Thread Richard Guenther
This fixes PR53898 by mimicing the other graphite files - leave the GCC includes included always to avoid an empty CU on graphite-disabled builds. Committed as obvious. Richard. p Description: Binary data

Re: [patch] PR53887

2012-07-09 Thread Richard Guenther
On Mon, Jul 9, 2012 at 12:57 PM, Steven Bosscher wrote: > Hello, > > How annoying that it was decided at some point to not always group > switch case labels in tree-cfgcleanup! This PR53887 and PR53881 before > it are both cases where the switch lowering to bit tests ICEs because > the case labels

Re: [PATCH] Fix up mksysinfo.sh

2012-07-09 Thread Ian Lance Taylor
On Fri, Jun 29, 2012 at 11:34 AM, Jakub Jelinek wrote: > > The recent mksysinfo.sh change for glibc 2.16 bits/resource.h unfortunately > doesn't work, because the sed invocation two lines earlier removes the {}s > this sed command is looking for. > The following makes gcc 4.7 as well as trunk buil

[patch] PR53887

2012-07-09 Thread Steven Bosscher
Hello, How annoying that it was decided at some point to not always group switch case labels in tree-cfgcleanup! This PR53887 and PR53881 before it are both cases where the switch lowering to bit tests ICEs because the case labels haven't been grouped. For PR53887 there is a case label that shares

[Ada] Preelaboration dependences for Remote_Types and RCI units

2012-07-09 Thread Arnaud Charlet
The declarations of Remote_Types and Remote_Call_Interface packages are allowed to depend on preelaborated packages, as specified in AI05-206, as long as the dependence is made using a private with_clause. Before this fix, the compiler was disallowing such a dependence for RCI packages, and for Rem

[Ada] New generic routine to iterate through interface sources

2012-07-09 Thread Arnaud Charlet
This new routine interfaces through all sources needed to interface to a library. All the specs are handled and also the bodies when needed (if there is a pragma inline of the spec is generic for example). Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-09 Pascal Obry * prj-

[Ada] Analysis of delayed aspects for components in record types

2012-07-09 Thread Arnaud Charlet
The following test illustrates the exemple of an aspect Atomic that applies to a component of a record type. -- Source -- procedure Cutdown is type Rec is record Comp : aliased Integer; Acomp : aliased Integer with Atomic => Atom; end record; Atomi

[Ada] Visibility of aspects between freeze point and end of declarations

2012-07-09 Thread Arnaud Charlet
Expressions of stream aspects and also aspects Variable_Indexing, Constant_Indexing, Default_Iterator and Iterator_Element are names that can be overloaded. This patch checks at the end of the declarations there is an interpretation of these names that matches the entity obtained at the freeze poin

[Ada] Delete Exp_Dbug.No_Dollar_In_Label

2012-07-09 Thread Arnaud Charlet
This variable is no longer used, so is removed. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-09 Joel Brobecker * exp_dbug.ads (No_Dollar_In_Label): Delete. Index: exp_dbug.ads === --- exp_dbug.ads(re

[Ada] Cleanup in raise-gcc.c

2012-07-09 Thread Arnaud Charlet
As this unit is always compiled for the runtime, remove the #ifndef IN_RTS parts. Also update comments and clean up code. No functional change. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-09 Tristan Gingold * raise-gcc.c (db_indent): Simplify style, improve comments.

RE: [PATCH] Disable loop2_invariant for -Os

2012-07-09 Thread Zhenqiang Chen
>> >> 1) If -fira_loop_pressure is enabled, it reduces ~24% invariant motions in my >tests. But it does not help on total code size. Seams there is issue to update >the >"regs_needed" after moving an invariant out of the loop (My benchmark logs >show ~73% cases have more than one invariants moved)

Re: [RFT] Remove -fno-tree-dominator-opts from libgcc/config/t-darwin

2012-07-09 Thread Iain Sandoe
On 9 Jul 2012, at 09:11, Iain Sandoe wrote: >> crt3.o: $(srcdir)/config/darwin-crt3.c > regstrapped (all+ada+objc++) on i686-darwin9 with no regressions. .. but, now I re-check, crt3 is only used on Darwin 8 and earlier; That will take somewhat longer to check, machine availability is an issue

Re: [patch] Rebase insn data to make CODE_FOR_nothing == 0, revert r161809

2012-07-09 Thread Richard Guenther
On Sun, Jul 8, 2012 at 9:44 PM, Steven Bosscher wrote: > Hello, > > A lot of optab_handler checks are against CODE_FOR_nothing, which is > currently a target dependent number, the last value in "enum > insn_code". This made target reinitializing slow, so Richard S. > changed the optab_handler inde

Re: [patch] Add block debug info to phi_arg_d

2012-07-09 Thread Richard Guenther
On Sun, Jul 8, 2012 at 9:29 AM, Dehao Chen wrote: > Hi, Richard, > > A test is added. Is it ok? Ok. Thanks, RIchard. > Thanks, > Dehao > > gcc/testsuite/ChangeLog > > 2012-07-08 Dehao Chen > > * gcc.dg/debug_info_inline.c: New test. > > Index: gcc/testsuite/gcc.dg/debug_info_inline.c

Re: [RFT] Remove -fno-tree-dominator-opts from libgcc/config/t-darwin

2012-07-09 Thread Iain Sandoe
Hi Steven, On 7 Jul 2012, at 16:34, Steven Bosscher wrote: > On Sat, Jul 7, 2012 at 5:06 PM, H.J. Lu wrote: >> Are you sure this the right patch? -fno-tree-dominator-opts is still here. > > I am sure it is not the right patch :-) > Thanks! > > Index: libgcc/config/t-darwin > ==

Re: Tree tail merging breaks __builtin_unreachable optimization

2012-07-09 Thread Richard Guenther
On Fri, Jul 6, 2012 at 6:36 PM, Tom de Vries wrote: > On 06/07/12 13:01, Richard Guenther wrote: >> On Thu, Jul 5, 2012 at 8:45 PM, Tom de Vries wrote: >>> On 05/07/12 15:30, Michael Matz wrote: Hi, On Thu, 5 Jul 2012, Tom de Vries wrote: > The asserts allow the return res

Re: [patch][libcpp] PR53690 - wrong code for C++11 UCN

2012-07-09 Thread Jason Merrill
On 07/09/2012 09:07 AM, Andreas Schwab wrote: You also get 0 for a partial UCN, which is significant for forms_identifier_p. Right. Since 0 is a valid UCN, we can't use the return value both for the UCN and the predicate; I'd suggest returning the UCN by pointer parameter. Jason

Re: [patch][libcpp] PR53690 - wrong code for C++11 UCN

2012-07-09 Thread Andreas Schwab
Steven Bosscher writes: > In any case, it's valid for C++11. Jason modified charset.c to > implement the C++11 change and handle the differences between C99 and > C++11 (*) but I think he overlooked the two lines at the bottom that > convert a 0 result to 1. You also get 0 for a partial UCN, whi