Re: [google] New linker plugin to do function reordering in the final binary using callgraph profiles (issue4802070)

2011-08-02 Thread davidxl
Ok for google branches It is better to have a higher level compiler option to be introduced for this purpose instead of asking user to specify the plugin path. The option should enable 1) ffunction-sections; 2) cgraph note section genration; 3) enable the plugin. One possibility is to enhance th

Re: PATCH [x32]: Support x32 __NR_rt_sigreturn

2011-08-02 Thread Ian Lance Taylor
"H.J. Lu" writes: > 2011-08-02 H.J. Lu > > * config/i386/linux-unwind.h (RT_SIGRETURN_SYSCALL): New. > (x86_64_fallback_frame_state): Use RT_SIGRETURN_SYSCALL and > long long to check rt_sigreturn syscall. This is OK. Thanks. Ian

PATCH [x32]: Support x32 __NR_rt_sigreturn

2011-08-02 Thread H.J. Lu
Hi, X32 uses 0x4206 for system call number __NR_rt_sigreturn and long long is needed for 64bit integer. OK for trunk? Thanks. H.J. --- 2011-08-02 H.J. Lu * config/i386/linux-unwind.h (RT_SIGRETURN_SYSCALL): New. (x86_64_fallback_frame_state): Use RT_SIGRETURN_SYSCALL an

Re: [google] New linker plugin to do function reordering in the final binary using callgraph profiles (issue4802070)

2011-08-02 Thread Sriraman Tallam
Hi, This patch adds a new linker plugin to re-order functions. The plugin constructs an annotated callgraph with edge profile information and then repeatedly groups sections that are connected by hot edges and passes the new function layout to the linker. The grouping is done similar to the P

[PATCH, ARM] Fix PR target/49437 Thumb2 epilog with stack realignment

2011-08-02 Thread Joey Ye
This patch fixes PR49437 with a single line change in ARM backend and a regression test case for ARM target ChangeLog: 2011-08-02 Matthew Gretton-Dann PR target/49437 * config/arm/arm.c (arm_output_epilogue): Properly handle epilogue when stack was realigned in interru

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-02 Thread Richard Henderson
I got Jeff Law to review the reload change on IRC and committed the composite patch. Tested on x86_64, i586, avr, and h8300. Most other tier1 targets ought not be affected, as this patch only applies to ACCUMULATE_OUTGOING_ARGS == 0 targets. r~

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-02 Thread H.J. Lu
On Tue, Aug 2, 2011 at 2:02 PM, Jason Merrill wrote: > On 06/30/2011 04:47 PM, H.J. Lu wrote: >> >> +@defmac REG_VALUE_IN_UNWIND_CONTEXT >> + >> +Define this macro if the target stores register values as >> +@code{_Unwind_Word} type in unwind context.  The default is to >> +store register values a

Re: [H8] Fix unwind info for movmd

2011-08-02 Thread Richard Henderson
On 08/02/2011 02:15 PM, Andreas Schwab wrote: > Richard Henderson writes: > >> diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c >> index 99b37ab..69218cb2d 100644 >> --- a/gcc/dwarf2cfi.c >> +++ b/gcc/dwarf2cfi.c > > Did you mean to commit this? > > Andreas. > Err, yes. But clearly I somehow m

Re: [H8] Fix unwind info for movmd

2011-08-02 Thread Andreas Schwab
Richard Henderson writes: > diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c > index 99b37ab..69218cb2d 100644 > --- a/gcc/dwarf2cfi.c > +++ b/gcc/dwarf2cfi.c Did you mean to commit this? Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5

C++ PATCH for c++/49593 (failure with T{/**/}...)

2011-08-02 Thread Jason Merrill
We need to look for packs in the type of a CONSTRUCTOR to handle list-initialized temporaries. Tested x86_64-pc-linux-gnu, applied to trunk. commit 642c479a11613a80ea8eea986178be0cc60e5a39 Author: jason Date: Tue Aug 2 21:09:08 2011 + PR c++/49593 * pt.c (find_parameter_packs_r

C++ PATCH for c++/49803 (wrongly initializing union member in constructor)

2011-08-02 Thread Jason Merrill
The compiler was wrongly clearing uses_unions_p when recursing into the anonymous struct, breaking the union logic. Tested x86_64-pc-linux-gnu, applying to trunk. commit e7830050a2bd41b5109b9e09512b0f285c47001c Author: jason Date: Tue Aug 2 21:08:57 2011 + PR c++/49803 * init.c

C++ PATCH for c++/49577 (missing narrowing errors)

2011-08-02 Thread Jason Merrill
A couple of narrowing errors we were missing: we need to deal with reshape_init discarding the {} and still complain, and we need to handle unsignedness mismatch. Tested x86_64-pc-linux-gnu, applied to trunk. commit 2d486097a6240eb2a4d0caaf2cdf1a5f12faa249 Author: Jason Merrill Date: Tue Aug

C++ PATCH for c++/43886 (bogus error with lambda in default arg)

2011-08-02 Thread Jason Merrill
With lambdas, we can have a function body inside a default argument, so we need to clear parser->local_variables_forbidden_p. Tested x86_64-pc-linux-gnu, applying to trunk. commit bdbb09d8c20e71b3e4a023fd1bf49005a59b03a7 Author: Jason Merrill Date: Tue Aug 2 16:22:24 2011 -0400 PR c++/4

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-02 Thread Jason Merrill
On 06/30/2011 04:47 PM, H.J. Lu wrote: +@defmac REG_VALUE_IN_UNWIND_CONTEXT + +Define this macro if the target stores register values as +@code{_Unwind_Word} type in unwind context. The default is to +store register values as @code{void *} type. + +@end defmac This ought to suggest why a port

Re: [Patch, Fortran] PR fortran/49885: Fix automatic character array allocation

2011-08-02 Thread Daniel Kraft
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/02/11 22:04, Tobias Burnus wrote: > Daniel Kraft wrote: >> after a lng while, here's another patch from me. It is a >> one-line fix for PR 49885, which was introduced by me last year. >> While the patch should be simple, it wasn't that easy

[patch tree-optimization]: Improve reassociation pass for bitwise-operations

2011-08-02 Thread Kai Tietz
Hello, this patch improves the ability of reassociation pass to simplifiy more complex bitwise-binary operations with comparisons. We break-up for this patch statements like (X | Y) != 0 to X != 0 | Y != 0, and (X | Y) == 0 to expanded X == 0 & Y == 0. Additionally we expand logical-not expressio

Re: [Patch, Fortran] PR fortran/49885: Fix automatic character array allocation

2011-08-02 Thread Tobias Burnus
Daniel Kraft wrote: after a lng while, here's another patch from me. It is a one-line fix for PR 49885, which was introduced by me last year. While the patch should be simple, it wasn't that easy to find the fix (for me at least) ... but I think it should be fairly easy to see now. For som

[H8] Fix unwind info for movmd

2011-08-02 Thread Richard Henderson
The h8sx multilib fails to build because h8300_swap_into_er6 used the push function, which set RTX_FRAME_RELATED_P. This resulted in mismatched (and incorrect) unwind info across two different execution paths. The trivial solution is to unset RTX_FRAME_RELATED_P from the push, but it's now possi

Re: [GCC-MELT-151] [MELT] Add a few tree primitives

2011-08-02 Thread Basile Starynkevitch
On Tue, 2 Aug 2011 19:13:04 +0200 Romain Geissler wrote: > > You should build MELT in an empty build tree. Please give us the log file > > of your make > > (don't use make -j, only a sequential make). > > Ok, i'll send you that tomorrow. Tell me if you want that i explore this > issue on my con

[PATCH][JAVA] Build a correct tree for rewritten method invocations

2011-08-02 Thread Peter Collingbourne
The Java frontend currently produces an incorrectly typed tree if a method call is rewritten. Specifically, the callee operand is a NOP_EXPR casting the address of the target method to the original method type. This patch causes the NOP_EXPR cast to use the type of the target method instead. The

[Patch, Fortran] PR fortran/49885: Fix automatic character array allocation

2011-08-02 Thread Daniel Kraft
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, after a lng while, here's another patch from me. It is a one-line fix for PR 49885, which was introduced by me last year. While the patch should be simple, it wasn't that easy to find the fix (for me at least) ... but I think it should be fa

Re: [AVR] Fix PR49881

2011-08-02 Thread Richard Henderson
On 08/02/2011 12:01 PM, Georg-Johann Lay wrote: > Didn't try it yet. Is that capable of fixing the runtime FAILs? Apparently. I installed your simulator and get comparable results to http://gcc.gnu.org/ml/gcc-testresults/2011-07/msg03632.html r~

[lra] one more patch to decrease ARM code size degradation

2011-08-02 Thread Vladimir Makarov
The following patch decreases ARM code size degradation for LRA. It permits achieve practically the same SPECINT2000 code size on ARM as for reload (there is still small ARM code size degradation on SPECFP2000). The patch was successfully bootstrapped on x86-64. 2011-08-02 Vladimir Makarov

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Kai Tietz
Sorry, had a pasto in testcase. Fixed at rev. 166205 2011-08-02 Kai Tietz PR middle-end/49947 * gcc.dg/tree-ssa/forwprop-15.c Tested on x86_64-pc-linux-gnu. Applied as obvious fix. Regards, Kai Index: gcc.dg/tree-ssa/forwprop-15.c

Re: [AVR] Fix PR49881

2011-08-02 Thread Richard Henderson
On 08/02/2011 12:01 PM, Georg-Johann Lay wrote: > == avrtest == > > There is a text > http://lists.gnu.org/archive/html/avr-gcc-list/2011-06/msg00015.html > and a README: > http://winavr.cvs.sourceforge.net/viewvc/winavr/avrtest/README?view=markup > > In the case there are questions: Ask. Ah, a

Re: [AVR] Fix PR49881

2011-08-02 Thread Georg-Johann Lay
In CCing Jörg. Richard Henderson schrieb: On 08/02/2011 12:52 AM, Georg-Johann Lay wrote: There are still unrecognizables: gcc.c-torture/execute/complex-7.c:56:1: error: unrecognizable insn: (insn 17 14 18 3 (set (mem:SF (post_dec:HI (reg/f:HI 32 __SP_L__)) [0 S4 A8]) (reg:SF 43 [ f5.0

[H8] Fix target/49878

2011-08-02 Thread Richard Henderson
The problem here is that reload finds a push of arg_pointer_rtx and disables register elimination of AP->SP because of it. This leads to a register elimination (and assertion) failure when it comes time to output debug info. Preventing eliminable registers from being pushed fixes this. The chang

ping: [patch] libiberty/cp-demangle.c: Fix CP_DEMANGLE_DEBUG SIGSEGV

2011-08-02 Thread Jan Kratochvil
ping: On Tue, 28 Jun 2011 22:15:04 +0200, Jan Kratochvil wrote: Hi, a mechanical patch which fixes during #define CP_DEMANGLE_DEBUG make check -> /bin/sh: line 1: 9179 Segmentation fault ./test-demangle < ./demangle-expected which also fixes confusing output for _Z1hI1AIiEdEDTcldtfp_1gIT

C++ PATCH for c++/49834 (auto not deduced in for-range-declaration)

2011-08-02 Thread Jason Merrill
Even in a template, if the range-init is not type-dependent, we can deduce 'auto' in the for-range-declaration. Tested x86_64-pc-linux-gnu, applying to trunk. commit 5384cac2db4875bc2f34bce11c6d1a3c360cd66d Author: Jason Merrill Date: Tue Aug 2 13:42:21 2011 -0400 PR c++/49834 * pa

Re: [AVR] Fix PR49881

2011-08-02 Thread Richard Henderson
On 08/02/2011 12:52 AM, Georg-Johann Lay wrote: > There are still unrecognizables: > > gcc.c-torture/execute/complex-7.c:56:1: error: unrecognizable insn: > (insn 17 14 18 3 (set (mem:SF (post_dec:HI (reg/f:HI 32 __SP_L__)) [0 S4 A8]) > (reg:SF 43 [ f5.0+4 ])) > /mnt/nfs/home/georg/gnu/gcc

PR ada/49944 [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)"

2011-08-02 Thread Ludovic Brenta
I think the following patch fixes this problem; it consists only in copying a few lines from s-osinte-linux.ads to s-osinte-kfreebsd-gnu.ads: Index: b/src/gcc/ada/s-osinte-kfreebsd-gnu.ads === --- a/src/gcc/ada/s-osinte-kfreebsd-gnu.a

Re: Ping: C-family stack check for threads

2011-08-02 Thread Thomas Klein
Hello Here is my next try to put the stack check into rtl at prologue stage. To me, it was not as easy as I hoped. I've had little problems to get push/pop and the compare/jump working. Hoping the way i choose is acceptable. With rtl no extra pool to hold pointer or size values is required any mo

Re: [GCC-MELT-150] [MELT] Add a few tree primitives

2011-08-02 Thread Romain Geissler
Le 2 août 2011 à 18:38, Basile Starynkevitch a écrit : > On Tue, 2 Aug 2011 17:02:05 +0200 > Romain Geissler wrote: > >> Hi, >> >> I added a few primitives about trees, plus a string_to_long >> conversion primitive and a foreach_pair_between iterator >> that allows to iterate between two pairs

Doc updates for OpenMP 3.1 support, -grecord-gcc-switches, __builtin_assume_aligned and debug info improvements

2011-08-02 Thread Jakub Jelinek
Hi! --- index.html 15 Jul 2011 09:48:15 - 1.808 +++ index.html 2 Aug 2011 17:01:52 - @@ -53,6 +53,13 @@ mission statement. +August 2, 2011 +An implementation of the http://www.openmp.org/mp-documents/OpenMP3.1.pdf";>OpenMP v3.1 +parallel programming interface for C, C++ and Fo

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread H.J. Lu
On Tue, Aug 2, 2011 at 6:14 AM, Kai Tietz wrote: > 2011/8/2 Richard Guenther : >> On Tue, Aug 2, 2011 at 12:17 PM, Kai Tietz wrote: >>> Hello, >>> >>> this patch removes in forward-propagation useless comparisons X != 0 >>> and X != ~0 for boolean-typed X.  For one-bit precision typed X we >>> si

Re: [PATCH][2/2][RFC] Fix PR49806, promote/demote binary operations in VRP

2011-08-02 Thread Ira Rosen
Richard Guenther wrote on 02/08/2011 04:25:58 PM: > > Thinking about it it probably makes sense to keep a variant of this > in the vectorizer - after all it has quite specific requirements on > operand sizes while VRP would probably demote as far as possible > (maybe taking PROMOTE_MODE into a

Re: [MELT] Add a few tree primitives

2011-08-02 Thread Basile Starynkevitch
On Tue, 2 Aug 2011 17:02:05 +0200 Romain Geissler wrote: > Hi, > > I added a few primitives about trees, plus a string_to_long > conversion primitive and a foreach_pair_between iterator > that allows to iterate between two pairs of the same list (and > thus iterate on sublist). > > Note: again,

Re: [Patch, Fortran] Allocatable coarrays: Pass "token" to caf_registering

2011-08-02 Thread Mikael Morin
On Tuesday 02 August 2011 17:47:37 Tobias Burnus wrote: > Simple patch: Coarrays are identified by a token; this patch passes the > token (which is stored in the descriptor allocatable coarrays) to > libcaf's registering function. > > In terms of token and allocatable coarrays: The next step is to

Re: [Patch, Fortran testsuite, committed] Add/fix dg-final cleanup-module

2011-08-02 Thread Tobias Burnus
On 08/02/2011 06:01 PM, Mikael Morin wrote: It's a pity that I've made the same fixes myself. I was planing to commit soon. :-( Indeed it would have been more useful to avoid replicating the work. :-( On Tuesday 02 August 2011 17:34:46 Tobias Burnus wrote: * Wrong case: All module files are

[Patch, Fortran] (Coarray) Fix constraint checks for LOCK_TYPE

2011-08-02 Thread Tobias Burnus
This patch fixes two issues: a) LOCK(coarray%lock_type_comp) is also a coarray. b) The following constraint was incompletely checked for: C1302. For reference, I also list C1303/C1304. C1302 A named variable of type LOCK TYPE shall be a coarray. A named variable with a noncoarray subcomponen

Re: [Patch, Fortran testsuite, committed] Add/fix dg-final cleanup-module

2011-08-02 Thread Mikael Morin
It's a pity that I've made the same fixes myself. I was planing to commit soon. :-( On Tuesday 02 August 2011 17:34:46 Tobias Burnus wrote: > This patch fixes dg-final cleanup-modules issues: > * Missing cleanups > * Wrong case: All module files are lower case This is not actually a problem as cl

Re: PING: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-08-02 Thread H.J. Lu
PING. On Thu, Jul 28, 2011 at 3:01 PM, H.J. Lu wrote: > Hi Richard, Jason, > > Is this patch > > http://gcc.gnu.org/ml/gcc-patches/2011-06/msg02401.html > > OK for trunk? > > Thanks. > > > H.J. > On Mon, Jul 11, 2011 at 3:21 PM, H.J. Lu wrote: >> Ping. >> >> On Wed, Jul 6, 2011 at 2:20 PM, H.J.

Re: [PATCH 3/3] Remove code that supported legacy CLooG.

2011-08-02 Thread Sebastian Pop
Ping. Could one of the configure maintainers review these changes? Thanks, Sebastian On Thu, Jul 21, 2011 at 18:00, Tobias Grosser wrote: > 2011-07-21  Tobias Grosser   > >        * configure: Regenerated. >        * config/cloog.m4: Do not define CLOOG_ORG > > and in gcc/ > > 2011-07-21  Tobia

[Patch, Fortran] Allocatable coarrays: Pass "token" to caf_registering

2011-08-02 Thread Tobias Burnus
Simple patch: Coarrays are identified by a token; this patch passes the token (which is stored in the descriptor allocatable coarrays) to libcaf's registering function. In terms of token and allocatable coarrays: The next step is to fix passing actual arguments to assumed-shape coarrays dummie

Re: [PATCH 2/3] Require cloog 0.16.3

2011-08-02 Thread Sebastian Pop
Ping. Could one of the configure maintainers review these changes? Thanks, Sebastian On Thu, Jul 21, 2011 at 18:00, Tobias Grosser wrote: > 2011-07-21  Tobias Grosser   > >        * configure: Regenerated. >        * configure.ac: Require cloog isl 0.16.3 > --- >  ChangeLog    |    5 + >  

Re: [PATCH 1/3] Make CLooG isl the only supported CLooG version.

2011-08-02 Thread Sebastian Pop
Ping. Could one of the configure maintainers review these changes? Thanks, Sebastian On Thu, Jul 21, 2011 at 18:00, Tobias Grosser wrote: > 2011-07-21  Tobias Grosser   > >        * configure: Regenerated. >        * config/cloog.m4: Remove support for CLooG-ppl and CLooG-parma, >        both c

Re: [patch tree-optimization]: Add cleanup code for possible unused statements in binary optimization

2011-08-02 Thread Kai Tietz
2011/8/2 Richard Guenther : > On Tue, Aug 2, 2011 at 12:39 PM, Kai Tietz wrote: Thanks, yes, I noticed that. Patch adjusted for cfg_tree. ChangeLog 2011-08-02  Kai Tietz          * tree-ssa-forwprop.c (simplify_bitwise_binary):        Remove possible unused statement after optimization

Re: C++ PATCH for c++/49260 (lambda-eh2.C failure on several targets)

2011-08-02 Thread Jason Merrill
On 06/22/2011 11:50 AM, Jason Merrill wrote: This failure was happening on all targets that don't use either CFI assembler directives or asynchronous unwind tables: we were mistakenly deciding that the _FUN thunk for returning from the lambda function pointer conversion operator couldn't throw be

[Ada] Locate_Exec_On_Path should only return executable files

2011-08-02 Thread Arnaud Charlet
When searching for an executable to run, Unix shells check every directory on PATH and stop at the first matching executable found. GNAT.OS_Lib.Locate_Exec_On_Path, however, returned the first matching regular file, even if it wasn't executable. As a result, when an executable tries to find where i

[Ada] Recognize HIDE directive in SPARK as special comment

2011-08-02 Thread Arnaud Charlet
In SPARK, some parts of code that are ignored in the analysis can be "hidden", through the use of a HIDE directive formatted as a special comment. There is no benefit in detecting violations of SPARK restriction in such hidden parts, so we now recognize the HIDE directive from SPARK and do not repo

[Ada] Spurious errors with complex slice expression

2011-08-02 Thread Arnaud Charlet
A tree node must never be analyzed if it is not attached to the tree for the current compilation, because the parent link is used for numerous semantic checks and code insertions. This patch fixes a violation of this rule in the analysis of array aggregates, where expressions in component associati

[Ada] Add flag Body_Is_In_ALFA on subprogram entities

2011-08-02 Thread Arnaud Charlet
Follow-up of changes to define which entities are in the ALFA subset for formal verification. Here, we define a flag Body_Is_In_ALFA that applies to entities for subprograms, which is set to True when the subprogram body can be analyzed formally. This is the initial definition, to be refined. Test

Re: [PATCH 2/2] Fix PR47594: Build signed niter expressions

2011-08-02 Thread Sebastian Pop
On Tue, Aug 2, 2011 at 04:50, Richard Guenther wrote: > On Tue, 2 Aug 2011, Sebastian Pop wrote: > >> --- a/gcc/graphite-scop-detection.c >> +++ b/gcc/graphite-scop-detection.c >> @@ -196,6 +196,12 @@ graphite_can_represent_scev (tree scev) >>    if (chrec_contains_undetermined (scev)) >>      ret

[Ada] New entity flag defines which entities are in ALFA subset

2011-08-02 Thread Arnaud Charlet
The ALFA subset corresponds to those entities which can be formally analyzed through the SPARK or Why tool-sets. This is the initial work to identify these entities, for integer/enumeration types and subtypes, objects of such types and subprogram specifications. Tested on x86_64-pc-linux-gnu, comm

[Ada] Inline expression functions whenever possible

2011-08-02 Thread Arnaud Charlet
This patch treats expression functions as functions with an implicit pragma Inline_Always. This ensures that they are chained to the list of inlined subprograms of the enclosing unit, and made available to the back end for inlining. The front-end does not examine whether inlining is actually possib

[MELT] Add a few tree primitives

2011-08-02 Thread Romain Geissler
Hi, I added a few primitives about trees, plus a string_to_long conversion primitive and a foreach_pair_between iterator that allows to iterate between two pairs of the same list (and thus iterate on sublist). Note: again, it's a git patch for Pierre until Basil returns. Romain 0001-Add-a-few-

[Ada] Wrong conformance checking for null exclusions of dispatching ops

2011-08-02 Thread Arnaud Charlet
The compiler improperly checks subtype conformance of null exclusions on anonymous access parameters in Ada 2005 cases involving dispatching operations. In Ada 2005, controlling access parameters are defined to implicitly exclude null (more properly, their anonymous access type excludes null). The

[Ada] Code cleanup

2011-08-02 Thread Arnaud Charlet
This patch does not change the functionality of the compiler. It removes one argument that can be evaluated by the called routine. No test required. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Javier Miranda * exp_atag.ads, exp_atag.adb (Build_Common_Dispatch

[Ada] Implementation of AI05-0071: class-wide ops for formal subprograms

2011-08-02 Thread Arnaud Charlet
>From the text of AI05-0071: If a generic unit has a subprogram_default specified by a box, and the corresponding actual parameter is omitted, then it is equivalent to an explicit actual parameter that is a usage name identical to the defining name of the formal. {If a subtype_mark in t

[Ada] Optional section in ALI files for local cross-references

2011-08-02 Thread Arnaud Charlet
In ALFA mode, generate an additional section in ALI files for so-called 'local' cross-references, which 1) group the cross-references in each subprogram or package; 2) add references to object definitions ('D' or 'I' with initialization). This new section should be used in specific back-ends which

[Ada] Primitive operations of formals when actual is class-wide

2011-08-02 Thread Arnaud Charlet
If the actual for a formal type with unknown discriminants is class-wide, then a call to a primitive operation of the formal that dispatches on result raises program_error in the instance if the context cannot provide a tag for the call. This is the case for a declaration of an object of the formal

[Ada] Better error message for Excluded_Source_List_File

2011-08-02 Thread Arnaud Charlet
When an error is reported for an excluded source that is listed in a file include the file name and the number of the line of the excluded source. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Vincent Celier * prj-nmsc.adb (File_Found): New components Excl_File and Excl

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Richard Guenther
On Tue, Aug 2, 2011 at 4:34 PM, Kai Tietz wrote: > 2011/8/2 Richard Guenther : >> On Tue, Aug 2, 2011 at 3:14 PM, Kai Tietz wrote: >>> 2011/8/2 Richard Guenther : On Tue, Aug 2, 2011 at 12:17 PM, Kai Tietz wrote: > Hello, > > this patch removes in forward-propagation useless com

[Ada] Fix missing debug info for concatenation

2011-08-02 Thread Arnaud Charlet
The new concatenation circuitry installed some time ago, results in missing debug information when a constant string is initialized with the result of a concatenation. This is because the resulting generated renaming did not generate required debug information. This patch fixes the problem with con

[Ada] Allow run-time to be compiled with Normalize_Scalars

2011-08-02 Thread Arnaud Charlet
This patch allows the run-time to be compiled with normalize scalars. More specifically, it fixes a warning about initialiation overlays when Ada.Strings.Unbounded.Aux is compiled with this pragma. Note that the previous fix to pragma Suppress_Initialization is required. The following test should

[Ada] Ada 2012 AI-0113 Detection of conflicting external tags

2011-08-02 Thread Arnaud Charlet
This patch enables detection of conflicting external tags when compiling under Ada 2005 mode. Required since this AI is a binding interpretation. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Javier Miranda * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 200

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Kai Tietz
2011/8/2 Richard Guenther : > On Tue, Aug 2, 2011 at 3:14 PM, Kai Tietz wrote: >> 2011/8/2 Richard Guenther : >>> On Tue, Aug 2, 2011 at 12:17 PM, Kai Tietz wrote: Hello, this patch removes in forward-propagation useless comparisons X != 0 and X != ~0 for boolean-typed X.  For

[Ada] Ada 2012 AI-0113 Detection of conflicting external tags

2011-08-02 Thread Arnaud Charlet
This patch adds a runtime check to the elaboration of tagged types to raise Program_Error if a user-specified external tag is the same as the external tag for some other declaration. The following test must raise Program_Error if compiled with -gnat12 package Pkg1 is type Typ is tagged null rec

[Ada] Implementation of Ada2012 rules on preconditions for null procedures

2011-08-02 Thread Arnaud Charlet
Ada Issue AI05-0230 specifies that null procedures can only have inheritable 'Class preconditions. For compatibility with the earlier GNAT pragmas for preconditions, this rule only applies to Ada2012 aspect specifications. Compilation of p.ads must yield: p.ads:5:06: aspect "Pre" requires 'Cl

[PLUGIN] Install c-tree.h header

2011-08-02 Thread Romain Geissler
Hi, For now, plugins can't compare types. This patch allows c-tree.h to be installed as a plugin header, allowing plugins to see "comptypes" (among other things). Romain Geissler 2011-08-02 Romain Geissler * Makefile.in (PLUGIN_HEADERS): Add C_TREE_H. Index: gcc/Makefile.in ==

[Ada] Pre/Postconditions on generic subprograms

2011-08-02 Thread Arnaud Charlet
This patch is a partial implementation of pre/postconditions that apply to generic subprograms and are inherited by the corresponding instantiations. This implementation does not defer the analysis of the corresponding aspects to a later point, and therefore is restricted to conditions that only de

[Ada] Iterators over containers of indefinite types

2011-08-02 Thread Arnaud Charlet
If the elements of the container are indefinite, the iterator must build the actual subtypes of each element in the iteration. As this is done during expansion, the analysis of the loop body must be delayed until the loop is expanded as an iterator loop. The following must compile quietly in Ada201

Re: [RFC] hard-reg-set.h refactoring

2011-08-02 Thread Mike Stump
On Aug 2, 2011, at 12:51 AM, Paolo Bonzini wrote: > On 08/01/2011 09:10 PM, Dimitrios Apostolou wrote: >> >> Keeping my patch exactly the same, just changing the >> hook_void_hard_reg_set to receive a (HOST_WIDEST_FAST_INT *) arg and >> doing the necessary typecasts, added an extra 3 M instructi

[Ada] Premature finalization when iterating over containers

2011-08-02 Thread Arnaud Charlet
This patch adds code to ensure the timely finalization of a local element copy when iterating over a container. -- Source -- -- types.ads with Ada.Containers.Doubly_Linked_Lists; package Types is package Lists is new Ada.Containers.Doubly_Linked_Lists (Integer);

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Richard Guenther
On Tue, Aug 2, 2011 at 3:14 PM, Kai Tietz wrote: > 2011/8/2 Richard Guenther : >> On Tue, Aug 2, 2011 at 12:17 PM, Kai Tietz wrote: >>> Hello, >>> >>> this patch removes in forward-propagation useless comparisons X != 0 >>> and X != ~0 for boolean-typed X.  For one-bit precision typed X we >>> si

[Ada] Premature finalization when iterating over containers

2011-08-02 Thread Arnaud Charlet
This patch supresses the finalization of an intermediate copy produced when a cursor iterates over a collection. The intermediate copy is still finalized when the associated loop goes out of scope. -- Source -- -- types.ads with Ada.Containers.Doubly_Linked_Lists; pack

Re: [PATCH][2/2][RFC] Fix PR49806, promote/demote binary operations in VRP

2011-08-02 Thread Richard Guenther
On Tue, 2 Aug 2011, Ira Rosen wrote: > > > Richard Guenther wrote on 02/08/2011 01:33:49 PM: > > > > On Tue, 2 Aug 2011, Ira Rosen wrote: > > > > > > > > > + /* Now we have matched the statement pattern > > > > + > > > > +rhs1 = (T1)x; > > > > +rhs2 = (T1)y; > > > > +o

[Ada] Final implementation of Default[_Component]_Value aspects

2011-08-02 Thread Arnaud Charlet
This patch completes the implementation of the Default_Value and Default_Component_Value aspects as described in AI05-0228. Note that there is no matching pragma or attribute definition clause for these aspects (because it is difficult to get these working because of freezing problems resulting fro

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Kai Tietz
2011/8/2 Richard Guenther : > On Tue, Aug 2, 2011 at 12:17 PM, Kai Tietz wrote: >> Hello, >> >> this patch removes in forward-propagation useless comparisons X != 0 >> and X != ~0 for boolean-typed X.  For one-bit precision typed X we >> simplifiy X == 0 (and X != ~0) to ~X, and for X != 0 (and X

[Ada] Ada2012 iterators over containers given by a function call

2011-08-02 Thread Arnaud Charlet
If the range of iteration in an Ada2012 iterator is a function call returning a container, finalization actions will in general be created because the predefined containers are controlled. The finalization actions must be taken into account when rewriting the iteration as a while-loop. Compiling a

[Ada] Strip Switch.C of most of its dependencies

2011-08-02 Thread Arnaud Charlet
Switch.C had needless dependencies on most of the front end, causing a circular dependency on Back_End for back ends written in Ada. This patch cleans up the dependencies through introduction of a new Warnsw package specifically for warning switches, and by moving variables related to the preproces

[Ada] Missing accessibility check in anonymous access types

2011-08-02 Thread Arnaud Charlet
The compiler does not handle well the accessibility check of anonymous access types that are formals of anonymous access to subprogram components of record types. The execution of the program may crash or have unexpected behavior since the check is performed with an expected actual (the accessibili

[Ada] Addition of new attribute Original_Access_Type

2011-08-02 Thread Arnaud Charlet
This patch does not change the behavior of the compiler. It adds a new attribute to facilitate some non gcc back-end work to locate the protected subprogram type entity associated with an internally generated access to subprogram type. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02

[Ada] Various fpt related clean ups

2011-08-02 Thread Arnaud Charlet
[1] Add d.b debug option for showing available back end types This debug option prints out information on all types that the back end indicates it supports. [2] Allow fpt types with more than Long_Long_Float'Digits digits This patch takes advantage of the new infrastructure in Cstand to allow de

[Ada] Register back end floating point types

2011-08-02 Thread Arnaud Charlet
This patch adds a new mechanism to have the Ada front end query what types are supported by the back end. Types other than floating point types are currently ignored. The information is needed because the list of floating point types that may be present is open-ended, so it is impossible to add que

[Ada] Lift inlining limitation with -gnatn (2)

2011-08-02 Thread Arnaud Charlet
This fixes an oversight in the previous change: the check for library-level inlined functions must be adjusted to the result of Get_Code_Unit_Entity. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Eric Botcazou * inline.adb (Add_Inlined_Body): Adjust check for library-le

RE: [Patch,AVR]: Cleanup libgcc.S

2011-08-02 Thread Weddington, Eric
> -Original Message- > From: Georg-Johann Lay [mailto:a...@gjlay.de] > Sent: Tuesday, August 02, 2011 4:24 AM > To: gcc-patches@gcc.gnu.org > Cc: Anatoly Sokolov; Denis Chertykov; Weddington, Eric > Subject: [Patch,AVR]: Cleanup libgcc.S > > This patch fixes RCALL/RJMP instructions to ot

[Ada] Reduce compilation time at -O0 (5/n)

2011-08-02 Thread Arnaud Charlet
This patch slightly reduces compilation time at -O0 in typical conditions by streamlining the implementation of the Sem_Type.Covers predicate. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Eric Botcazou * sem_type.adb (Covers): Move trivial case

[Ada] Iteration of containers given by function calls

2011-08-02 Thread Arnaud Charlet
In Ada2012, the domain of iteration of a loop or quantified expression can be a function call that yields a container. This patch implements the support for default iterators over such expressions, that is to say iterators that use the default indexing machinery present in all containers. The follo

Re: [Patch,AVR]: Cleanup libgcc.S

2011-08-02 Thread Denis Chertykov
2011/8/2 Georg-Johann Lay : > This patch fixes RCALL/RJMP instructions to other modules by replacing them > with XCALL resp. XJMP. > > Moreover, now each function (except _cleanup) is enclosed in DEFUN/ENDF pairs > so that size information is available for each function. > > Ok? Approved. Denis.

Re: [PATCH][2/2][RFC] Fix PR49806, promote/demote binary operations in VRP

2011-08-02 Thread Ira Rosen
Richard Guenther wrote on 02/08/2011 01:33:49 PM: > > On Tue, 2 Aug 2011, Ira Rosen wrote: > > > > > > + /* Now we have matched the statement pattern > > > + > > > +rhs1 = (T1)x; > > > +rhs2 = (T1)y; > > > +op_result = rhs1 OP rhs2; > > > +lhs = (T2)op_result; >

Re: [patch tree-optimization]: Add cleanup code for possible unused statements in binary optimization

2011-08-02 Thread Richard Guenther
On Tue, Aug 2, 2011 at 12:39 PM, Kai Tietz wrote: > Hello, > > this patch adds some statement-cleanup to forward-propagation. > > ChangeLog > > 2011-08-02  Kai Tietz   > >        * tree-ssa-forwprop.c (simplify_bitwise_binary): >        Remove possible unused statement after optimization. > > 2011

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Richard Guenther
On Tue, Aug 2, 2011 at 12:17 PM, Kai Tietz wrote: > Hello, > > this patch removes in forward-propagation useless comparisons X != 0 > and X != ~0 for boolean-typed X.  For one-bit precision typed X we > simplifiy X == 0 (and X != ~0) to ~X, and for X != 0 (and X == ~0) to > X. > For none one-bit p

[Ada] Missing expansion of equality operators in pre/post conditions

2011-08-02 Thread Arnaud Charlet
The frontend does not expand record equalities found in Ada 2012 pre/post conditions. After this patch the execution of the following test fails the postcondition (as expected). procedure Old_Bug is type Val is new Integer; type Index is new Integer range 1 .. 10; type Point is record X,

[Ada] Code cleanup

2011-08-02 Thread Arnaud Charlet
This patch extends the functionality of routine Is_Variable to avoid duplicating part of its code in routine Side_Effect_Free. No functionality change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Javier Miranda * sem_util.ads, sem_util.adb (Is_Variable): Add a new fo

[Ada] No style checking in instances

2011-08-02 Thread Arnaud Charlet
This patch turns off style checking in instances. The following should compile quietly with -gnatyO: gcc -c -gnatyO -gnatl p.ads with Ada.Strings.Bounded; package P is new Ada.Strings.Bounded.Generic_Bounded_Length (100); Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Bob Duff

[patch tree-optimization]: Add cleanup code for possible unused statements in binary optimization

2011-08-02 Thread Kai Tietz
Hello, this patch adds some statement-cleanup to forward-propagation. ChangeLog 2011-08-02 Kai Tietz * tree-ssa-forwprop.c (simplify_bitwise_binary): Remove possible unused statement after optimization. 2011-08-02 Kai Tietz * gcc.dg/tree-ssa/forwprop-9.c: Add tes

[Ada] Reduce compilation time at -O0 (4/n)

2011-08-02 Thread Arnaud Charlet
This patch significantly reduces compilation time at -O0 in typical conditions by removing useless big local temporaries in Allocate_Initialize_Node. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Eric Botcazou * atree.adb (Allocate_Initialize_Nod

[Ada] Do not use specific stream routines for strings when not available

2011-08-02 Thread Arnaud Charlet
When using a configurable run time, it is very likely that stream routines for string types are not present (they require file system support). In this case, the specific stream routines for strings are not used, relying on the regular stream mechanism instead. This patch changes only the behaviou

[Ada] gnatmake fails with incorrect default config project file

2011-08-02 Thread Arnaud Charlet
When a default config project file (for example default.cgpr in .../share/gpr) exists, gnatmake was parsing it, and would fail if, for example, Default_Language was not declared. This patch ensures that an existing config project file is never taken into account by gnatmake. The test is to invoke g

  1   2   >