Re: [PATCH] Fix ENTRY_VALUE parameter setup in var-tracking (PR debug/50215)

2011-08-29 Thread Richard Guenther
On Sun, Aug 28, 2011 at 8:56 PM, Jakub Jelinek ja...@redhat.com wrote: Hi! Depending on the computed hash of the parameter register, corresponding ENTRY_VALUE and the size of the hash table it can sometimes happen that val2 = cselib_lookup_from_insn will actually find val, which means that

[Ada] Analyze pre/post expression for correctness in formal verification mode

2011-08-29 Thread Arnaud Charlet
Since expansion of pre/post is skipped in formal verification mode, the analysis of pre/post expressions for correctness, and to complete nodes with their types, was missing. Now corrected. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Yannick Moy m...@adacore.com *

[Ada] Prevent expansion of array aggregates in formal verification mode

2011-08-29 Thread Arnaud Charlet
The backend for formal verification handles much more easily aggregates that are not expanded into loops, as this happens with array aggregates, so prevent expansion in this mode. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Yannick Moy m...@adacore.com * exp_aggr.adb

[Ada] New compiler attributes Dependency_Kind and Language_Kind

2011-08-29 Thread Arnaud Charlet
Two new configuration attributes for languages are added: Dependency_Kind and Language_Kind. No change of functionality so no test. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Vincent Celier cel...@adacore.com * prj-attr.adb: New Compiler attribute Dependency_Kind and

[Ada] Spurious ambiguity in instances

2011-08-29 Thread Arnaud Charlet
Within an instance, a spurious ambiguity may arise between a local subprogram and the actual for a formal subprogram of the enclosing instance. Previously the code only handled spurious ambiguities between two actuals or two local subprograms. The following must compile quietly: --- function

[Ada] Insert subtypes for array index/component in formal verification mode

2011-08-29 Thread Arnaud Charlet
In formal verification mode, it is expected that subtypes are declared before use, hence these additional declarations. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Yannick Moy m...@adacore.com * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration

[Ada] Remove overzealous warnings about Asm statements

2011-08-29 Thread Arnaud Charlet
Do not warn for multiple consecutive Asm statements. The warning was intended to prevent a common case where users expect such consecutive statements to be listed in order in the code as given, withotu specifying necessary input and output constraints. However, since we now warn about missing

[Ada] Use subtraction to negate VAX float on Alpha VMS

2011-08-29 Thread Arnaud Charlet
Using cpysn just flips the sign bit, but that will generate an invalid VAX Float for an input value of 0.0, as VAX float formats do not allow signed zeros. The following should compile and execute successfully. procedure test1 is XX, YY, ZZ : Long_Float; begin XX := 0.0; YY := 1.1;

[Ada] Crash on conversion to derived private type with invisible discriminants

2011-08-29 Thread Arnaud Charlet
This change fixes the processing of a type conversion to a derived type with a private non-discriminated ancestor whose full view has a discriminant with default. Previous compiler versions would crash or produce a junk error message. The following compilation must be accepted quietly: $ gcc -c

[Ada] Instantiations and subprogram declarations do not break statement SCO seq

2011-08-29 Thread Arnaud Charlet
This change ensures that a subprogram declaration or a generic instantiation does not create a new entry point in the sequence of statement SCOs. For the following compilation, a single statement sequence SCO line shall be output for the declaration of X, the instantiation I, and the declaration

[Ada] Remove the Support_64_Bit_Divides flag

2011-08-29 Thread Arnaud Charlet
The Support_64_Bit_Divides flag in file system.ads was used prevent the inclusion of the 64-bit division routine from libgcc when there is no hardware support for this operation. However, the front end is not the most appropriate place to control this. In the link phase we have all the required

[PATCH] Add missing location to MEM

2011-08-29 Thread Richard Guenther
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-08-29 Richard Guenther rguent...@suse.de * gimple-fold.c (gimple_fold_stmt_to_constant_1): Set a location on the built ADDR_EXPR. Index: gcc/gimple-fold.c

[Ada] SCOs for pragmas

2011-08-29 Thread Arnaud Charlet
This change enhances the SCO information for pragmas: the pragma name is now recorded in the SCO, to allow Xcov to apply differentiated processing for different pragmas. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Thomas Quinot qui...@adacore.com * par_sco.adb,

[Ada] Add new attribute 'Elab_Subp_Body

2011-08-29 Thread Arnaud Charlet
This new attribute, similar to 'Elab_Body for a subprogram is used only in CodePeer mode, and corresponds to CodePeer's 'Elab_Subp_Body special init procedure. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Arnaud Charlet char...@adacore.com * bindgen.adb

Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-29 Thread Pedro Alves
On Sunday 28 August 2011 22:36:28, Kai Tietz wrote: +#ifdef HAVE_ENOSPC + no_space_on_device = ENOSPC, +#endif no_such_device = ENODEV, @@ -96,12 +100,18 @@ -//not_supported = ENOTSUP, +#ifdef

[Ada] Address clauses in timed entry calls

2011-08-29 Thread Arnaud Charlet
If the trigger in a timed entry call is a dispatching primitive, the kind of dispatching operation being invoked (procedure, protected entry or task entry) is determined at run-time, and the construct expands into a test in which the branches execute separate copies of the triggering statements.

[Ada] Generated tag assignment after object declaration

2011-08-29 Thread Arnaud Charlet
The expansion of an object declaration for a tagged object includes a separate assignment to the tag of the entity being declared. This assignment was not being analyzed in all cases, as when it is the result of the expansion of a 'Old attribute. The following must compile quietly: gnatmake

Patch ping

2011-08-29 Thread Jakub Jelinek
Hi! http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01767.html PR middle-end/48722 Fix RTL sharing problem with CALL_INSN_FUNCTION_USAGE http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00428.html Adjust gthr-posix.h so that g++ -C -E works with STL headers

[Ada] Add new attribute System_Allocator_Alignment

2011-08-29 Thread Arnaud Charlet
This attribute returns the alignment honored by malloc. The following program should display this value: with Ada.Text_IO; use Ada.Text_IO; procedure Alloc_Algn is begin Put_Line (malloc alignment: Integer'Image (Standard'System_Allocator_Alignment)); end Alloc_Algn; Tested on

Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-29 Thread Paolo Carlini
On 08/29/2011 10:54 AM, Pedro Alves wrote: While these two didn't get the HAVE_... prefix. Was that intended? To be clear: make sure before committing that *all* use _GLIBCXX_HAVE_* Paolo.

[Ada] Correct object path when binding extending SALs

2011-08-29 Thread Arnaud Charlet
When binding a Stand-Alone library that is extending another Stand-Alone library, ALI files that are not interfaces of the SAL project may not be found, because the object path was incorrectly set. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Vincent Celier cel...@adacore.com

[Ada] Assignment to a packed component with a change of representation

2011-08-29 Thread Arnaud Charlet
If the left-hand side is a packed component, The expansion of an assignment statement uses a single bit-field operation. If the component is a record and the right hand side of the assignment has a different representation, the assignment must be expanded into individual component assignments,

[Ada] Skip frontend when option -gnatd.H is present

2011-08-29 Thread Arnaud Charlet
If the option -gnatd.H is present (Standard Package mode for gnat2why), skip the frontend, except the call to Create_Standard, and call the backend directly. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Johannes Kanig ka...@adacore.com * frontend.adb (Frontend): Exit

[Ada] Handle alignment for controlled objects

2011-08-29 Thread Arnaud Charlet
The new implementation of controlled objects didn't handle all alignments cases. No behaviour change compared to the previous implementation. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * s-pooglo.adb (Allocate, Deallocate): Take

[Ada] Crash on use of 'Old

2011-08-29 Thread Arnaud Charlet
The Ada2012 attribute 'Old is expanded into an object declaration that captures the value of a formal before execution. This patch fixes a bug that placed the object declaration in the wrong scope when the enclosing subprogram body had a single local declaration for a use clause. The following

[Ada] Optimization of assignments to bit-packed components with rep. clauses

2011-08-29 Thread Arnaud Charlet
This patch improves on the code generated for an assignment to a component of a bit-packed array, when lhs and rhs have a different representation. Executing the following : gcc -c -gnatG p1.adb | grep -c '\$system__pack_40' must yield: 1 --- package Conf is type UINT32_T is mod

[Ada] Test for common parent before testing for sibling

2011-08-29 Thread Arnaud Charlet
Splice_Subtree specifies a position in the target container to which the source subtree should be moved. The target position is a 2-tuple comprising the new parent of the subtree and its new (next) sibling (parameter Before). Before attempting to move the subtree, the implementation must perform

[Ada] Add the default search dirs after the Builder switches

2011-08-29 Thread Arnaud Charlet
The default search dirs were set before the Builder switches were read in the main project files. When the Builder switches included --RTS=, the wrong default search dirs were added. This patch ensures that the default search dirs are added after the Builder switches were read. There is no simple

[Ada] Implementation of AI05-213 : formal incomplete types

2011-08-29 Thread Arnaud Charlet
Ada2012 introduce a new kind of formal type definition. An incomplete formal type can be instantiated with any actual (as long as discriminants and tagged nature conform). The actual for a formal incomplete type is not frozen by the instance itself. The following must compile quietly in Ada2012

[Ada] Legality checks on access-to-object types

2011-08-29 Thread Arnaud Charlet
Some checks on illegal uses of class-wide expressions do not apply to access_ to_subprograms. Use base type to determine whether an access subtype belongs to the latter category. The following must compile quietly in Ada205 mode: package T is pragma Elaborate_Body; end T; --- with

[Ada] Remove GCC_ZCX_Support in system-*.ads

2011-08-29 Thread Arnaud Charlet
This constant was in fact useless as ZCX_By_Default implied it. No change in behavior. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads, system-tru64.ads,

[Ada] Renaming of unconstrained limited function calls

2011-08-29 Thread Arnaud Charlet
If the renamed object in an object renaming declaration is a function call of a limited type, the expansion of the renaming is complicated by the presence of various temporaries and subtypes that capture constraints of the renamed object. This patch rewrites the renaming as an object declaration,

[Ada] Remove N_Cleanups_To_Trigger in GNAT_GCC_Exception.

2011-08-29 Thread Arnaud Charlet
Preliminary work to handle foreign exceptions. No functionnal change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants. (GNAT_GCC_Exception): Remove

[PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Alexandre Lissy
Files containing the MELT translated to C code were not loaded correctly due to bad search path when working with an installed plugin. Present commit fixes this by: - using a melt find to search in current dir - ensuring the melt_modulename in melt descriptor only contains the module name,

[Ada] Remove superfluous Container parameter

2011-08-29 Thread Arnaud Charlet
The operations Find_In_Subtree and Ancestor_Find had a Container parameter as part of the signature (it was included in AI05-0136 by mistake), but that parameter is not necessary, and has therefore been removed. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Matthew Heaney

[Ada] Some is reserved in Ada 2012

2011-08-29 Thread Arnaud Charlet
This patch makes some a reserved word, as will be required by the Ada 2012 RM. The following test must get an error: % gcc -c -gnat2012 some_id.ads some_id.ads:2:04: reserved word some cannot be used as identifier package Some_Id is Some : Integer; -- ERROR: some is a reserved word end

[Ada] Do not defer aborts while raising exceptions (ZCX)

2011-08-29 Thread Arnaud Charlet
Aborts are deferred just before propagating an exception and undefered at the beginning of usual exception handler. But this mechanism is not necessary if ZCX propagation is used (as aborts are synchronous in this case) and prevents from using foreign (eg C++) exceptions are aborts won't be

Re: [Fortran, Patch] Coarray: libcaf patch for _gfortran_caf_deregister

2011-08-29 Thread Tobias Burnus
On 08/29/2011 12:33 AM, Mikael Morin wrote: diff --git a/libgfortran/caf/mpi.c b/libgfortran/caf/mpi.c index ea4c0f0..711c6ee 100644 --- a/libgfortran/caf/mpi.c +++ b/libgfortran/caf/mpi.c @@ -103,7 +103,7 @@ _gfortran_caf_finalize (void) { while (caf_static_list != NULL) { -

[Ada] Move remaining sjlj bits from a-except-2005.ads to a-exexpr.adb

2011-08-29 Thread Arnaud Charlet
Little cleanup, no functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb (To_Jmpbuf_Address): Ditto (builtin_longjmp): Ditto Index:

Re: Patch ping

2011-08-29 Thread Joseph S. Myers
On Mon, 29 Aug 2011, Jakub Jelinek wrote: http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00428.html Adjust gthr-posix.h so that g++ -C -E works with STL headers OK in the absence of libgcc maintainer

[Ada] Tan should never raise Constraint_Error

2011-08-29 Thread Arnaud Charlet
The check that raises Constraint_Error for arguments that equal the machine number nearest Pi / 2.0 must be removed, as the tangent of this machine number is well-defined and does not overflow. -- Test case, should compile and execute quietly with Ada.Numerics.Long_Long_Elementary_Functions; use

Re: Vector Comparison patch

2011-08-29 Thread Richard Guenther
On Sat, Aug 27, 2011 at 3:39 AM, Artem Shinkarov artyom.shinkar...@gmail.com wrote: Hi Here is a patch with vector comparison only. Comparison is expanded using VEC_COND_EXPR, conversions between the different types inside the VEC_COND_EXPR are happening in optabs.c. I have split out the

[Ada] Allow foreign exceptions

2011-08-29 Thread Arnaud Charlet
With this new feature, foreign exceptions can be caught in 'when others' handlers and will correctly propagate through Ada frames (including at-end handlers). No pure Ada test. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com *

Re: Patch ping

2011-08-29 Thread Bernd Schmidt
On 08/29/11 11:03, Jakub Jelinek wrote: http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01767.html PR middle-end/48722 Fix RTL sharing problem with CALL_INSN_FUNCTION_USAGE Looks OK. Bernd

Re: Vector Comparison patch

2011-08-29 Thread Paolo Bonzini
On 08/18/2011 11:23 AM, Richard Guenther wrote: Yeah, well. That's really a question for language lawyers;) I agree that it would be nice to have mask ? val0 : val1 behave the same for scalars and vectors. The question is whether for vectors you define it on the bit-level (which makes it

Re: [C++0x] contiguous bitfields race implementation

2011-08-29 Thread Richard Guenther
On Fri, Aug 26, 2011 at 8:54 PM, Aldy Hernandez al...@redhat.com wrote: This is a slight update from the last revision, with your issues addressed as I explained in the last email.  However, everything turned out to be much tricker than I expected (variable length offsets with arrays, bit

Re: PING: [PATCH]: Fix -fbranch-probabilities

2011-08-29 Thread Christian Bruel
On 08/27/2011 02:04 AM, Jan Hubicka wrote: Hello, Could I have a review for the trivial patch posted in http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01123.html -fprofile-use sets flag_branch_probabilities. But we should also be able to use -fbranch-probabilities on its own using the

Re: Vector Comparison patch

2011-08-29 Thread Richard Guenther
On Mon, Aug 22, 2011 at 9:50 PM, Uros Bizjak ubiz...@gmail.com wrote: On Mon, Aug 22, 2011 at 5:34 PM, Richard Guenther richard.guent...@gmail.com wrote: In this case it is simple to analyse that a is a comparison, but you cannot embed the operations of a into VEC_COND_EXPR. Sure, but if

Re: PING: [PATCH]: Fix -fbranch-probabilities

2011-08-29 Thread Richard Guenther
On Mon, Aug 29, 2011 at 1:59 PM, Christian Bruel christian.br...@st.com wrote: On 08/27/2011 02:04 AM, Jan Hubicka wrote: Hello, Could I have a review for the trivial patch posted in http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01123.html -fprofile-use sets flag_branch_probabilities.

[Ada] Internal cleanup in Ada.Exceptions.

2011-08-29 Thread Arnaud Charlet
The procedure Setup_Exception did nothing and is now removed. No functionnal change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * a-exexpr.adb (Setup_Exception): Removed. * a-exexpr-gcc.adb (Setup_Exception): Removed.

[Ada] Simplify Propagate_Exception

2011-08-29 Thread Arnaud Charlet
Remove all its parameters as they were unused. No functionnal changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * a-exexpr.adb (Propagate_Exception): Remove all the parameters as they were unused. *

Re: Vector Comparison patch

2011-08-29 Thread Richard Guenther
On Mon, Aug 29, 2011 at 2:09 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, Aug 22, 2011 at 9:50 PM, Uros Bizjak ubiz...@gmail.com wrote: On Mon, Aug 22, 2011 at 5:34 PM, Richard Guenther richard.guent...@gmail.com wrote: In this case it is simple to analyse that a is a

[Ada] Cleanup in exception_occurrence

2011-08-29 Thread Arnaud Charlet
Two components (Private_Data and Cleanup_Flag) are now removed because they were unused. No functionnal change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag. *

[Ada] Double evaluation in allocator for unconstrained packed array

2011-08-29 Thread Arnaud Charlet
This patch fixes a typo in the expansion of an allocator for an unconstrained packed array, when the expression is a function call. The execution of tester below must yield: in next_frame in next_frame 1 2 --- with Media; with ada.text_IO; procedure Tester is Case_1 :Media.Image

[Ada] Inheriting non-conformant homographs

2011-08-29 Thread Arnaud Charlet
In Ada 2012 it is possible to inherit non-conformant homographs, but they can't be called or overridden. The following test now compiles silently. package Pack1 is type Int1 is interface; procedure Op (X : in Int1) is null; end Pack1; package Pack2 is type Int2 is interface;

[Ada] Adjustments to Alfa mode for types and packing

2011-08-29 Thread Arnaud Charlet
Compilation was stopping on errors in Alfa mode due to incorrect generation of a type, and inconsistent treatment of packing. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Yannick Moy m...@adacore.com * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like

Re: [v3] Handle different versions of Solaris 8 iso/math_iso.h, iso/stdlib_iso.h

2011-08-29 Thread Rainer Orth
Hi Paolo, I guess the patch is ok now? Yes. Nice that Jon replied in the meanwhile and clarified the undefined behavior issue: for the time being I think we can keep the __cplusplus checks, should also help during this testing period. We can certainly clean up the thing later. Maybe you

[Ada] Remove Exc_Stack (was unused)

2011-08-29 Thread Arnaud Charlet
This exception stack was once used by VMS, but isn't anymore. No functional change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove. (Initialize_TCB): Remove Exc_Stack_Ptr

[Ada] Factorize code in raise-gcc.c

2011-08-29 Thread Arnaud Charlet
No functional change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * raise-gcc.c (get_ip_from_context): New function. Factorize code. Index: raise-gcc.c === ---

[Ada] Blank lines in SCO information

2011-08-29 Thread Arnaud Charlet
This change prevents Put_SCOs from emitting a spurious blank line in the ALI file in case the length of a statements line is congruent to 0 modulo 6. The following compilation must not produce any blank line in the middle of C lines. $ gcc -c -gnateS blank_line_in_scos.adb package

[Ada] Reimplement Ada.Numerics.Generic_Real_Arrays in pure Ada

2011-08-29 Thread Arnaud Charlet
This new implementation avoids dependencies on BLAS and LAPACK. The advantages are simplicity (no external requirements), more certainty about accuracy and availability for all floating point types. Obvious disadvantages are lack of target-specific optimizations that may affect both accuracy, less

Re: [PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Basile Starynkevitch
On Mon, Aug 29, 2011 at 12:21:12PM +0200, Alexandre Lissy wrote: Files containing the MELT translated to C code were not loaded correctly due to bad search path when working with an installed plugin. Present commit fixes this by: - using a melt find to search in current dir - ensuring the

Re: [PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Alexandre Lissy
Le 29/08/2011 15:15, Basile Starynkevitch a écrit : On Mon, Aug 29, 2011 at 12:21:12PM +0200, Alexandre Lissy wrote: Files containing the MELT translated to C code were not loaded correctly due to bad search path when working with an installed plugin. Present commit fixes this by: - using a

[Ada] Suppress expansion related to tasking and tagged types in Alfa mode

2011-08-29 Thread Arnaud Charlet
Alfa mode for formal verification currently does no deal with tasking and tagged types. Suppress expansion of these features to simplify input to formal verification back-end. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Yannick Moy m...@adacore.com * exp_ch13.adb

[Ada] Properly initialize aggregated projects to compute dependencies

2011-08-29 Thread Arnaud Charlet
Project dependencies are needed in various cases, for instance because the linker needs to find all the list of non-Ada objects when building a global archive in gprbuild. But these project dependencies need to be explicitly computed initially, and this wasn't done for aggregated projects. Tested

Re: [v3] Handle different versions of Solaris 8 iso/math_iso.h, iso/stdlib_iso.h

2011-08-29 Thread Paolo Carlini
Hi, Hi Paolo, I guess the patch is ok now? Yes. Nice that Jon replied in the meanwhile and clarified the undefined behavior issue: for the time being I think we can keep the __cplusplus checks, should also help during this testing period. We can certainly clean up the thing later. Maybe

[Ada] Resolving spurious ambiguities within instantiations

2011-08-29 Thread Arnaud Charlet
The expanded code for an instantiation may contain apparent ambiguities when two subprograms that are generic formals or that depend on formal types become homonyms after formals are replaced with actuals. In some cases, the ambiguity can be resolved by favoring the innermost interpretation, when

[Ada] Navigate to next node in bucket

2011-08-29 Thread Arnaud Charlet
There are two overloadings of Next. One is a selector function to return the next node in the current bucket, the other navigates to the next element in the container. The implementation of Generic_Equal needs to call the former, as it interrogates the items in each bucket. Also, the buckets

[Ada] OpenVMS: truncate the length of GNAT_DRIVER_COMMAND_LINE logical

2011-08-29 Thread Arnaud Charlet
As the length of any logical is limited to 255 bytes. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold ging...@adacore.com * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of GNAT_DRIVER_COMMAND_LINE to 255. Index: gnatcmd.adb

[Ada] Errors with limited views of an incomplete type and its full view

2011-08-29 Thread Arnaud Charlet
If a package in a limited_with clause contains an incomplete type and its completion, both of them have a limited view, and these may be visible at the same time though intervening packages. These two limited views must be treated as identical in conformance tests. The following must build

Re: [PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Alexandre Lissy
Le 29/08/2011 15:15, Basile Starynkevitch a écrit : On Mon, Aug 29, 2011 at 12:21:12PM +0200, Alexandre Lissy wrote: Files containing the MELT translated to C code were not loaded correctly due to bad search path when working with an installed plugin. Present commit fixes this by: - using a

[v3] Fix libstdc++/50118

2011-08-29 Thread Paolo Carlini
Hi, tested x86_64-linux, committed to mainline. Thanks, Paolo. /// 2011-08-29 Paolo Carlini paolo.carl...@oracle.com PR libstdc++/50118 * include/bits/stl_list.h (_List_base:: _List_base(const allocator_type)): Remove.

Re: [PATCH] Teach forwprop how to optimize successive conversions

2011-08-29 Thread H.J. Lu
On Tue, May 10, 2011 at 2:55 AM, Richard Guenther rguent...@suse.de wrote: This moves fold-consts conversion folding to forwprop, our tree pattern matcher optimizer.  In addition to what fold-const does this makes us canonicalize unsigned truncations to use bitwise and of a mask, this form

[Ada] gnatmake ignores -largs in package Linker

2011-08-29 Thread Arnaud Charlet
It is not possible to specify -largs as a switch in package linker of the main project file, to link with an external library libargs. This patch corrects this. Now any option found in the switches of packages Compiler, Binder or Linker is taken as is into account. Tested on x86_64-pc-linux-gnu,

[Ada] Finalization actions in instances within generic units

2011-08-29 Thread Arnaud Charlet
Instance bodies nested within generic bodies are always built, so that semantic checks can be performed on them. Finalization actions on entities within these instances must not be generated because expansion will have been disabled at various points and because finalizers are only relevant in

[Ada] Iterations over derived containers

2011-08-29 Thread Arnaud Charlet
If the domain of iteration is a derived container type, the aspect Default_ Iterator is inherited. As for other calls to inherited operations, the actual must be view-converted to the type of the formal to be a valid argument. The following must compile quietly: gcc -c -gnat12 repro.adb ---

[Ada] Project manager should accept Ada 05 reserved words as identifiers

2011-08-29 Thread Arnaud Charlet
It was not possible to use an Ada reserved word such as Interface as an identifier, when the default Ada version is Ada 2005. This patch corrects this. The following project file should be accepted by all project aware tools such as gnatmake: project Interface is end Interface; Tested on

[Ada] Add declaration for Itypes in Alfa mode

2011-08-29 Thread Arnaud Charlet
The formal verification back-end expects declaration to be present for Itypes, even if they are not attached to the tree. Add such declarations in the case of Itypes introduced for index/component types of arrays and anonymous array types in object declaration. Tested on x86_64-pc-linux-gnu,

[Ada] Race condition in Make_Independent

2011-08-29 Thread Arnaud Charlet
Make_Independent decrements Wait_Count, which caused a race condition -- if the timing is just wrong, it causes Make_Passive to find Wait_Count = 0, which eventually causes the program to hang. This patch prevents hanging by decrementing Wait_Count only if nonzero. No test is available, because

[Ada] default-initialize all components of type Cursor

2011-08-29 Thread Arnaud Charlet
If an object of type Cursor does not have an explicit initialization expression, then it must default-initialize to the same value as constant No_Element. The Node component of type Cursor has scalar type Count_Type, so it requires an explicit initialization expression of its own declaration, in

[Ada] ignore exceptions in termination handlers

2011-08-29 Thread Arnaud Charlet
This patch causes exceptions propagated by the termination handler to be ignored, as required by the Ada RM. The following test should run to completion silently: with Ada.Task_Identification; with Ada.Task_Termination; use Ada.Task_Termination; with Ada.Exceptions; package Task_Term_Exc is

[Ada] Move must clear Source following assignment to Target

2011-08-29 Thread Arnaud Charlet
The semantics of operation Move for the bounded forms must match the semantics of the unbounded forms. The post-condition is defined (for all containers) such that when Move completes, the Source container is empty. The fix is to clear the Source container after its elements have been assigned to

[Ada] Ada 2012: Class-wide operations for formal subprograms

2011-08-29 Thread Arnaud Charlet
The equivalence defined in AI05-0071-1 for formal subprogram matching is extended such that it applies to explicit as well as default actual subprograms. The following test now compiles without errors. package Pack1 is type Root is tagged record F1 : Integer; end record;

[Ada] Make more robust when with-ing an instance with errors

2011-08-29 Thread Arnaud Charlet
This patch makes the compiler more robust in certain cases where with X refers to a library-level instance that got errors that caused instantiation abandoned. Previously, the compiler would sometimes go into an infinite loop. The following test should get errors: gcc -c main.adb p-i.ads:4:42:

[Ada] Store read/write through explicit dereference in ALFA mode

2011-08-29 Thread Arnaud Charlet
Formal verification relies on a computation of effects based on the local effects generated in ALFA sections in ALI files. These effects should mention explicitly all read/writes to memory through explicit dereferences. This is now done with a special HEAP variable. Tested on x86_64-pc-linux-gnu,

Re: [PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Alexandre Lissy
Le 29/08/2011 15:15, Basile Starynkevitch a écrit : On Mon, Aug 29, 2011 at 12:21:12PM +0200, Alexandre Lissy wrote: Files containing the MELT translated to C code were not loaded correctly due to bad search path when working with an installed plugin. Present commit fixes this by: - using a

Re: [PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Alexandre Lissy
Le 29/08/2011 16:44, Alexandre Lissy a écrit : Le 29/08/2011 15:15, Basile Starynkevitch a écrit : On Mon, Aug 29, 2011 at 12:21:12PM +0200, Alexandre Lissy wrote: Files containing the MELT translated to C code were not loaded correctly due to bad search path when working with an installed

Re: [PATCH 01/20] Make CLooG-ISL the only supported CLooG version.

2011-08-29 Thread Joseph S. Myers
I looked at the ISL sources and saw that they generally had license notices of the form: * Use of this software is governed by the GNU LGPLv2.1 license For use in GCC I think it needs to have the any later version clause to allow distribution under later versions of the LGPL as well, so that

Re: [Patch,AVR]: Cleanup progmem_section handling.

2011-08-29 Thread Denis Chertykov
2011/8/26 Georg-Johann Lay a...@gjlay.de: Georg-Johann Lay wrote: progmem_section is a section to put jump tables in. This patch puts jump tables in individual sections if -ffunction-section is on and does some more cleanup around that, i.e. implement TARGET_ASM_FUNCTION_RODATA_SECTION hook.

Re: PING: allow match_test to be used for attribute rtxes

2011-08-29 Thread Bernd Schmidt
On 08/23/11 12:12, Richard Sandiford wrote: Ping for: http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01181.html http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01182.html Ok. Bernd

Re: [PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Alexandre Lissy
Le 29/08/2011 16:57, Alexandre Lissy a écrit : Le 29/08/2011 16:44, Alexandre Lissy a écrit : Le 29/08/2011 15:15, Basile Starynkevitch a écrit : On Mon, Aug 29, 2011 at 12:21:12PM +0200, Alexandre Lissy wrote: Files containing the MELT translated to C code were not loaded correctly due to

Re: [PATCH] Change vcondmode to vcondmode1mode2

2011-08-29 Thread Richard Guenther
On Mon, 29 Aug 2011, Richard Guenther wrote: This patch makes a conversion optab from the direct optabs vcond and vcondu. This allows to specify different modes for the actual comparison and the value that is selected. All targets but i386 are trivially converted by

Re: [v3] Handle different versions of Solaris 8 iso/math_iso.h, iso/stdlib_iso.h

2011-08-29 Thread Rainer Orth
Hi Paolo, Interesting. I suppose you are going to inform the SunStudio engineer that some of the above has to be adjusted for gcc 4.7+ (otherwise, please let me know, I can probably do it via Stephen Clamage) that's the plan. I had some discussions about those issues when I brought up the

Re: [PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Alexandre Lissy
Le 29/08/2011 17:08, Alexandre Lissy a écrit : Le 29/08/2011 16:57, Alexandre Lissy a écrit : Le 29/08/2011 16:44, Alexandre Lissy a écrit : Le 29/08/2011 15:15, Basile Starynkevitch a écrit : On Mon, Aug 29, 2011 at 12:21:12PM +0200, Alexandre Lissy wrote: Files containing the MELT

Re: [PATCH] [MELT] Fix loading of .c files

2011-08-29 Thread Alexandre Lissy
Le 29/08/2011 17:22, Alexandre Lissy a écrit : Le 29/08/2011 17:08, Alexandre Lissy a écrit : Le 29/08/2011 16:57, Alexandre Lissy a écrit : Le 29/08/2011 16:44, Alexandre Lissy a écrit : Le 29/08/2011 15:15, Basile Starynkevitch a écrit : On Mon, Aug 29, 2011 at 12:21:12PM +0200, Alexandre

[PATCH] [MELT] Fix failing target 'melt-tiny-tests'

2011-08-29 Thread Alexandre Lissy
The newly introduced target 'melt-tiny-tests' was buggy, this commit fixes the issue by: - splitting target in two targets, introducing the 'melt-sayhello.melt' target which produces the MELT code corresponding, with a dependency on $(melt_default_modules_list).modlis. - adding a

Re: bb partitioning vs optimize_function_for_speed_p

2011-08-29 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/26/11 08:47, Bernd Schmidt wrote: In rest_of_reorder_blocks, we avoid reordering if !optimize_function_for_speed_p. However, we still call insert_section_bounary_note, which can cause problems because now, if we have a sequence of

Change i386 PIC thunk name

2011-08-29 Thread Bernd Schmidt
We currently generate __i686.get_pc_thunk.bx: movl(%esp), %ebx ret in PIC binaries. This can cause problems if the assembly output ends up in a .S file which is then compiled again: __i686 is a predefined macro and expands to 1. This happens in glibc when compiling csu/crti.S,

Re: [PATCH] libtool -- don't print warnings with --silent

2011-08-29 Thread Peter O'Gorman
On 07/29/2011 07:55 PM, John David Anglin wrote: Ping? Hi Dave, ltmain.sh is a generated file, so this patch is not correct. Perhaps something like (pasted in mail, so wrapped): diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 9358ec5..bd5736c 100644 ---

Re: Change i386 PIC thunk name

2011-08-29 Thread H.J. Lu
On Mon, Aug 29, 2011 at 9:11 AM, Bernd Schmidt ber...@codesourcery.com wrote: We currently generate __i686.get_pc_thunk.bx:        movl    (%esp), %ebx        ret in PIC binaries. This can cause problems if the assembly output ends up in a .S file which is then compiled again: __i686 is a

  1   2   >