Re: CFT: [build] Move soft-fp support to toplevel libgcc

2011-08-04 Thread Paolo Bonzini
On 08/03/2011 04:01 PM, Rainer Orth wrote: Configure tests could also make a better replacement for softfp_wrap_start and softfp_wrap_end. We've got two uses left right now: * libgcc/config/arm/t-softfp has #ifdef __ARM_ARCH_6M__. One could probably use AC_EGREP_CPP([__ARM_ARCH_6M__], , [a

Re: PATCH: Add -march=core-avx-i

2011-08-04 Thread Uros Bizjak
On Fri, Aug 5, 2011 at 4:45 AM, H.J. Lu wrote: > This patch adds -march=core-avx-i to support Intel Ivy Bridge.  OK > for trunk and 4.6? > 2011-08-04  H.J. Lu   > >        * config/i386/i386.c (processor_alias_table): Add core-avx-i. > >        * doc/invoke.texi: Document core-avx-i. OK. Thank

Re: CFT: [build] Move fp-bit support to toplevel libgcc

2011-08-04 Thread Paolo Bonzini
On 08/03/2011 03:46 PM, Rainer Orth wrote: Ok for mainline if they pass? I think the avr-lib.h and h8300-lib.h files should be modified to only define the constants when compiling fp-bit, because they pollute the namespace. Both avr and h8300 only use floats, so you can wrap them in #ifdef

Re: [PATCH, ARM] Support NEON's VABD with combine pass

2011-08-04 Thread Ramana Radhakrishnan
On 29 July 2011 10:58, Dmitry Melnik wrote: > This patch adds two define_insn patterns for NEON vabd instruction to make > combine pass recognize expressions matching (vabs (vsub ...)) patterns as > vabd. Interesting but I would be a bit defensive and make sure that this matches only if -ffast-ma

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

2011-08-04 Thread Weddington, Eric
> -Original Message- > From: Georg-Johann Lay [mailto:a...@gjlay.de] > Sent: Wednesday, August 03, 2011 4:42 AM > To: Weddington, Eric > Cc: gcc-patches@gcc.gnu.org; Anatoly Sokolov; Denis Chertykov; Joerg > Wunsch > Subject: Re: [Patch,AVR]: Cleanup libgcc.S > > > > It should be fairly

PATCH: Add -march=core-avx-i

2011-08-04 Thread H.J. Lu
Hi, This patch adds -march=core-avx-i to support Intel Ivy Bridge. OK for trunk and 4.6? Thanks. H.J. --- 2011-08-04 H.J. Lu * config/i386/i386.c (processor_alias_table): Add core-avx-i. * doc/invoke.texi: Document core-avx-i. diff --git a/gcc/config/i386/i386.c b/gcc/con

[CFT, delay slots] Fix middle-end/49977

2011-08-04 Thread Richard Henderson
This seems to do the trick for sim testing of sh-elf and cris-elf. I'm interested in advice re debugging experiences with delay slots. It seems like for calls there's no alternative but to have the unwind info be incorrect when stopped at the call insn itself. It also seems like we've similarly b

Re: [pph] Stream and merge line table. (issue4836050)

2011-08-04 Thread Lawrence Crowl
On 8/4/11, Gabriel Charette wrote: > IMPORTANT this patch goes on top of trunk patch issue4835047, which has yet > to be approved (I included the change as part of this patch for pph for > now). > > We now stream out the line_table from the pph'ed header and merge it back in > when compiling readi

Re: [PATCH, ARM] Generate conditional compares in Thumb2 state

2011-08-04 Thread Ramana Radhakrishnan
On 3 August 2011 08:48, Jiangning Liu wrote: > This patch is to generate more conditional compare instructions in Thumb2 > state. Given an example like below, > > int f(int i, int j) > { >  if ( (i == '+') || (j == '-') ) { >    return i; >  } else { >    return j; >  } > } > > Without the patch,

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

2011-08-04 Thread Ye Joey
Ping On Wed, Aug 3, 2011 at 8:44 AM, Joey Ye wrote: > > 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): Pro

[pph] Stream and merge line table. (issue4836050)

2011-08-04 Thread Gabriel Charette
IMPORTANT this patch goes on top of trunk patch issue4835047, which has yet to be approved (I included the change as part of this patch for pph for now). We now stream out the line_table from the pph'ed header and merge it back in when compiling reading a pph. All of the source_location's read

[v3] docbook vs. images

2011-08-04 Thread Benjamin Kosnik
This fixes the docbook html output with respect to images. Now, filerefs for PNG data are relative to the html install directory, and an images directory is copied and populated so that the links match PNG files. tested x86/linux -benjamin2011-08-04 Benjamin Kosnik * doc/xml/manual/build_ha

[PATCH] Correct zlib checks [Was: binutils prerequisites (recent zlib version - what else?)]

2011-08-04 Thread Maciej W. Rozycki
On Wed, 20 Apr 2011, Steffen Dettmer wrote: > I'm trying to build gcc-4.6.0 with binutils-2.21 in the same > source directory which fails with > > cc1: warnings being treated as errors > ../../../gcc-4.6.0/binutils/bfd/compress.c: In function > `bfd_compress_section_contents': > ../../../gcc-4.6.

[lra] patch to fix listdc++ build failure on ppc64

2011-08-04 Thread Vladimir Makarov
The following patch fixes a bug introduced by a recent LRA patch. The patch was successfully bootstrapped on x86-64 and ppc64. 2011-08-04 Vladimir Makarov * lra-constraints.c (uses_hard_regs_p): Use hard register elimination. Index: lra-constraints.c =

Re: [pph] Add initial support for including nested pph images (issue4847044)

2011-08-04 Thread gchare
So if I understand correctly, the reference system doesn't work yet, you just put out the design in this patch and you'll fill up functionality in an upcoming patch so that's it's clearer what you're adding? Cheers, Gab http://codereview.appspot.com/4847044/diff/1/gcc/cp/pph-streamer-in.c File

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

2011-08-04 Thread Steve Kargl
On Thu, Aug 04, 2011 at 11:36:11PM +0200, Mikael Morin wrote: > On Thursday 04 August 2011 22:45:34 Steve Kargl wrote: > > On Tue, Aug 02, 2011 at 05:34:46PM +0200, Tobias Burnus wrote: > > > There might be still some missing or wrong cleanups, but most remaining > > > .mod files are from gfortran.

[Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.

2011-08-04 Thread Janus Weil
Hi all, attached is a draft patch fixing the PR in the subject line and extending the checks for overriding type-bound functions. It regtests cleanly on x86_64-unknown-linux-gnu already, but I would like to have some feedback. The patch is rather large, but most of it is just mechanical, due to t

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

2011-08-04 Thread Mikael Morin
On Thursday 04 August 2011 22:45:34 Steve Kargl wrote: > On Tue, Aug 02, 2011 at 05:34:46PM +0200, Tobias Burnus wrote: > > There might be still some missing or wrong cleanups, but most remaining > > .mod files are from gfortran.fortran-torture. > > Yes, you missed a few. And you missed my two pa

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

2011-08-04 Thread Mikael Morin
On Wednesday 03 August 2011 22:55:34 Tobias Burnus wrote: > Mikael Morin wrote: > > Patch updated. > > Looks good! Thanks for the further clean up! > Committed as revision 177415. I also added the gfortran.dg/ directory in the ChangeLog for you previous patch (as revision 177416). Mikael Index

Re: [PATCH 1/7] Linemap infrastructure for virtual locations

2011-08-04 Thread Jason Merrill
On 08/04/2011 11:27 AM, Dodji Seketeli wrote: Yes, Tom and I thought about that, and decided that, this could be an optimization that could add later when the whole thing is known to work. Makes sense. +/* This is the highest possible source location encoded within an + ordinary or macro ma

Re: [patch i386]: Fix recent bootstrap failure for x86_64 windows target

2011-08-04 Thread Kai Tietz
2011/8/4 Richard Henderson : > On 08/04/2011 01:53 PM, Kai Tietz wrote: >>        diff = frame->stack_pointer_offset - frame->hard_frame_pointer_offset; >> -      if (diff > 240 || (diff & 15) != 0) >> +      if (diff > 240 || (diff & 15) != 0 || cfun->calls_alloca != 0) > > Hmm.  Why didn't the di

Re: [patch i386]: Fix recent bootstrap failure for x86_64 windows target

2011-08-04 Thread Richard Henderson
On 08/04/2011 01:53 PM, Kai Tietz wrote: >diff = frame->stack_pointer_offset - frame->hard_frame_pointer_offset; > - if (diff > 240 || (diff & 15) != 0) > + if (diff > 240 || (diff & 15) != 0 || cfun->calls_alloca != 0) Hmm. Why didn't the diff > 240 test trigger? r~

[patch i386]: Fix recent bootstrap failure for x86_64 windows target

2011-08-04 Thread Kai Tietz
Hello, recently we got a bootstrap failure in libfortran's transfer.c:sset function. This is caused by optimizing alloca into prologue. This can cause for x64 with SEH to too large prologue-frame-size for SEH information. This patch simply assumes that iff the function is using an alloca call, t

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

2011-08-04 Thread Steve Kargl
On Tue, Aug 02, 2011 at 05:34:46PM +0200, Tobias Burnus wrote: > > There might be still some missing or wrong cleanups, but most remaining > .mod files are from gfortran.fortran-torture. > Yes, you missed a few. 2011-08-04 Steven G. Kargl * gfortran.dg/trim_optimize_2.f90: Clean up

Re: [trans-mem] Move state from gtm_thread to gtm_transaction

2011-08-04 Thread Richard Henderson
On 08/04/2011 12:24 PM, Torvald Riegel wrote: > On Thu, 2011-08-04 at 11:55 -0700, Richard Henderson wrote: >> On 08/04/2011 09:22 AM, Torvald Riegel wrote: >>> On Thu, 2011-08-04 at 08:43 -0700, Richard Henderson wrote: On 08/03/2011 04:04 AM, Torvald Riegel wrote: > Move local_tid fr

Re: [trans-mem] Move state from gtm_thread to gtm_transaction

2011-08-04 Thread Torvald Riegel
On Thu, 2011-08-04 at 11:55 -0700, Richard Henderson wrote: > On 08/04/2011 09:22 AM, Torvald Riegel wrote: > > On Thu, 2011-08-04 at 08:43 -0700, Richard Henderson wrote: > >> On 08/03/2011 04:04 AM, Torvald Riegel wrote: > >>> Move local_tid from gtm_thread to gtm_transaction. > >>> > >>

Re: [patch i386]: Fix of a possible use of prior set variables

2011-08-04 Thread Richard Henderson
On 08/04/2011 11:50 AM, Kai Tietz wrote: > * config/i386/i386.c (setup_incoming_varargs_ms_64): Set > ix86_varargs_gpr_size and ix86_varargs_fpr_size to zero. Ok. r~

Re: [trans-mem] Move state from gtm_thread to gtm_transaction

2011-08-04 Thread Richard Henderson
On 08/04/2011 09:22 AM, Torvald Riegel wrote: > On Thu, 2011-08-04 at 08:43 -0700, Richard Henderson wrote: >> On 08/03/2011 04:04 AM, Torvald Riegel wrote: >>> Move local_tid from gtm_thread to gtm_transaction. >>> >>> * config/generic/tls.h (gtm_thread): Move local_tid from h

[patch i386]: Fix of a possible use of prior set variables

2011-08-04 Thread Kai Tietz
Hello, This patch resets for x64_64 windows abi the content of ix86_varargs_gpr_size and ix86_varargs_fpr_size to zero. Those variable might contain wrong values from prior use of sysv-abi va_list. ChangeLog 2011-08-04 Kai Tietz * config/i386/i386.c (setup_incoming_varargs_ms_64): S

Re: [build] Move sync, mips16.S to toplevel libgcc

2011-08-04 Thread Rainer Orth
Rainer Orth writes: > Another easy part in the toplevel libgcc move was sync.c and related > stuff. While doing this, it turned out to be easier to move the rest of > gcc/config/mips/t-libgcc-mips16 rather than leave it behind. > > The patch is untested except for including it in a mips-sgi-irix

Re: Fix Tru64 UNIX Ada bootstrap

2011-08-04 Thread Rainer Orth
Arnaud, >> Fixed as follows, bootstrap is well beyond the failure now. >> >> Ok for mainline? > > OK, thanks. unfortunately, it turned out that this fix only works when compiling ada/init.c inside gcc, not for gnatlib where CONST_CAST* isn't defined. I need the following patch instead, which is

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

2011-08-04 Thread Steve Kargl
On Thu, Aug 04, 2011 at 03:18:46PM +0200, Tobias Burnus wrote: > On 08/04/2011 02:44 PM, Mikael Morin wrote: > >>and I belief both "var%comp" and > >>"var" are named. > >My reading is that a named variable is a variable that is an object-name. > > That's actually my problem with the standard - it

Re: [pph] Free buffers used during tree encoding/decoding

2011-08-04 Thread Diego Novillo
On Wed, Aug 3, 2011 at 14:15, Gabriel Charette wrote: > We will probably need the strings in here until the end of the > compilation, so we could either just not free it (i.e. memory leak, > but allow important when program is over...) > > Or we could strcpy the strings pph'ed in, but that involv

[pph] Allocate string tables separately. (issue4843044)

2011-08-04 Thread Diego Novillo
This patch separates the string tables from input streams to allow the string tables to remain allocated throughout the compilation process. Gab, I think this addresses the problem you were seeing with your line number changes. Let me know if it doesn't. Tested on x86_64. Committed to branch.

[pph] Remove unused code (issue4844046)

2011-08-04 Thread Diego Novillo
In fixing the string table memory problem, I found that this code is not really used. Removed. Tested on x86_64. Committed to branch. Diego. * pph-streamer-in.c (pph_get_section_data): Remove unused function. (pph_free_section_data): Remove unused function. (pph_init

Re: [patch] Reduce over-promotion of vector operations

2011-08-04 Thread Ira Rosen
On 19 July 2011 09:44, Ira Rosen wrote: > Hi, > > This patch tries to reduce over-promotion of vector operations that > could be done with narrower elements, e.g., for > > char a; > int b, c; > short d; > > b = (int) a; > c = b << 2; > d = (short) c; > > we currently produce six vec_unpack_lo/hi_e

Re: [AVR] Fix target/34888

2011-08-04 Thread Georg-Johann Lay
Richard Henderson wrote: > On 08/04/2011 09:04 AM, Denis Chertykov wrote: >> Thank you for explanation. >> I have a very clean understanding of whole picture. >> May be better to use define_peephole2 with 3 insns as input and 1 as >> output for easy understanding. > > *shrug* Maybe. Then you also

Re: [trans-mem] Move state from gtm_thread to gtm_transaction

2011-08-04 Thread Torvald Riegel
On Thu, 2011-08-04 at 08:43 -0700, Richard Henderson wrote: > On 08/03/2011 04:04 AM, Torvald Riegel wrote: > > Move local_tid from gtm_thread to gtm_transaction. > > > > * config/generic/tls.h (gtm_thread): Move local_tid from here > > ... > > * libitm_i.h (local_

Re: [AVR] Fix target/34888

2011-08-04 Thread Denis Chertykov
2011/8/4 Richard Henderson : > On 08/04/2011 09:04 AM, Denis Chertykov wrote: >> Thank you for explanation. >> I have a very clean understanding of whole picture. >> May be better to use define_peephole2 with 3 insns as input and 1 as >> output for easy understanding. > > *shrug* Maybe.  Then you a

Re: [AVR] Fix target/34888

2011-08-04 Thread Richard Henderson
On 08/04/2011 09:04 AM, Denis Chertykov wrote: > Thank you for explanation. > I have a very clean understanding of whole picture. > May be better to use define_peephole2 with 3 insns as input and 1 as > output for easy understanding. *shrug* Maybe. Then you also have to check for whether TMP is d

Re: [AVR] Fix target/34888

2011-08-04 Thread Denis Chertykov
2011/8/4 Richard Henderson : > On 08/03/2011 11:09 PM, Denis Chertykov wrote: >> 2011/8/4 Richard Henderson : >>> When a frame pointer is in use, we can optimize popping all >>> queued parameters via a simple move from the frame pointer >>> instead of an addition to the stack pointer. >>> >>> The n

Re: [trans-mem] Release transaction objects on thread termination

2011-08-04 Thread Richard Henderson
On 08/03/2011 04:16 AM, Torvald Riegel wrote: > This patch removes the per-thread free-list of gtm_transaction objects. > With a single stable gtm_transaction object per thread, it is not > necessary anymore. If this is true, just move the entire gtm_transaction object into gtm_thread and have it

Re: [trans-mem] Test static constructors inside of transactional code

2011-08-04 Thread Richard Henderson
On 08/03/2011 04:57 AM, Torvald Riegel wrote: > Test static constructors inside of transactional code. > > * testsuite/libitm.c++/static_ctor.C: New file. Ok. > +static void *thread (void *dummy __attribute__((unused))) This is C++. Unnamed parameters work. r~

Re: [trans-mem] Test that nested txns started from pure/unsafe code work correctly

2011-08-04 Thread Richard Henderson
On 08/03/2011 04:51 AM, Torvald Riegel wrote: > Test that nested txns started from pure/unsafe code work correctly. > > * testsuite/libitm.c/reentrant.c: New file. Ok. r~

Re: [trans-mem] Move state from gtm_thread to gtm_transaction

2011-08-04 Thread Richard Henderson
On 08/03/2011 04:04 AM, Torvald Riegel wrote: > Move local_tid from gtm_thread to gtm_transaction. > > * config/generic/tls.h (gtm_thread): Move local_tid from here ... > * libitm_i.h (local_tid): ... to here. > * beginend.cc (GTM::gtm_transaction::begin_transaction): Sam

[pph] Add initial support for including nested pph images (issue4847044)

2011-08-04 Thread Diego Novillo
This patch adds initial support for PPH images that include other PPH images. Currently, we support this but it is inefficient. When a parent image includes a child image, the parent embeds all the contents of the child in its image. This is a waste of space. There is one other missing piece f

Re: [trans-mem] New TM method: serial-irrevocable on first write

2011-08-04 Thread Richard Henderson
On 08/03/2011 03:56 AM, Torvald Riegel wrote: > Add serialirr_onwrite_dispatch and use as new default method, for now. > > * retry.cc (GTM::gtm_transaction::decide_begin_dispatch): Use > serialirr_onwrite_dispatch as new default for now. > * method-serial.cc (serialirr_on

Re: [PATCH 3/7] Emit macro expansion related diagnostics

2011-08-04 Thread Dodji Seketeli
Hello, Below is an amended version of this patch after Jason's comments at http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00099.html. From: Dodji Seketeli Date: Sat, 4 Dec 2010 16:31:35 +0100 Subject: [PATCH 3/7] Emit macro expansion related diagnostics In this third instalment the diagnostic mac

[Ada] Get gnatls project path from Prj.Env

2011-08-04 Thread Arnaud Charlet
This change removes circuitry in gnatls that tried to approximate what is done in Prj.Env.Initialize_Default_Project_Path to set the project search path, and instead uses that routine directly. This fixes an inconsistency between gnatls' output and the actual behaviour of other project aware tools,

Re: [AVR] Fix target/34888

2011-08-04 Thread Richard Henderson
On 08/03/2011 11:09 PM, Denis Chertykov wrote: > 2011/8/4 Richard Henderson : >> When a frame pointer is in use, we can optimize popping all >> queued parameters via a simple move from the frame pointer >> instead of an addition to the stack pointer. >> >> The new sequence is 4 insns, the old seque

[Ada] AI05-0069 : Holder container

2011-08-04 Thread Arnaud Charlet
This AI defines a package Ada.Containers.Indefinite_Holders in order to create the ability to hold a single object of an indefinite type. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Vadim Godunko * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho". * a-coin

[Ada]Fix GNAT compilation error when SPARK restriction mode is set

2011-08-04 Thread Arnaud Charlet
GNAT compilation error when SPARK restriction mode was set with attribut reference violation is now correct. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Marc Sango * sem_attr.adb (Analyze_Attribute): Replace the message "invisible attribute of}" of the spark

[Ada] Implementation of AI05-0161 restriction No_Default_Stream_Attributes

2011-08-04 Thread Arnaud Charlet
This new restriction is intended to prevent the use of the predefined stream attributes for elementary types. A consequence of this restriction is that the default implementation of stream attributes for composite types cannot be created if any of its elementary components lacks user-defined Read a

[Ada] Remove C output of gnatbind

2011-08-04 Thread Arnaud Charlet
It is not possible anymore to generate the C version of the binder file. Switches -A and -C of gnatbind are now removed. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Tristan Gingold * bindgen.adb (Gen_Adainit_C): Remove. (Gen_Adafinal_C): Ditto. (Gen_E

[Ada] Detect generics as violation of the SPARK restriction

2011-08-04 Thread Arnaud Charlet
When the SPARK restriction was set, GNAT was not issuing violations on generic. Now corrected. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Marc Sango * sem_ch12.adb (Analyze_Generic_Package_Declaration, Analyze_Generic_Subprogram_Declaration, Analyze_Package_I

[Patch, Fortran] Coarrays: Add/fix check for no coarrays as result value

2011-08-04 Thread Tobias Burnus
This patch fixes the result check for coarrays / variables with coarray subcomponents. It was working with a separate RESULT() variable - but not if the function name was the result variable. Build and regtested on x86-64-linux. OK for the trunk? Tobias 2011-08-04 Tobias Burnus * resolve.

Re: [RFC PATCH] Allow user specs files to add self_spec

2011-08-04 Thread Joseph S. Myers
On Wed, 3 Aug 2011, Jakub Jelinek wrote: > 2011-08-03 Jakub Jelinek > > * gcc.c (self_spec): New variable. > (static_specs): Add self_spec. > (main): Call do_self_spec on "self_spec" specs after reading > user specs files. Move compare_debug handling right after that.

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

2011-08-04 Thread Mikael Morin
On Thursday 04 August 2011 15:18:46 Tobias Burnus wrote: > >> The problem is that > >> diagnosing the problem can get rather difficult. For instance: > >> > >> type t > >> type(lock_type) :: C > >> end type > >> type t2 > >> type(t), allocatable :: B > >> end type t2 > >> type t3 > >> type(t2) ::

[PATCH] Fix parts of PR49806

2011-08-04 Thread Richard Guenther
This patch fixes FAIL: gcc.dg/tree-ssa/vrp47.c scan-tree-dump-times vrp1 "x[^ ]* \^ 1" 1 FAIL: gcc.target/i386/andor-2.c scan-assembler-not sete by simplifying simplify_truth_ops_using_ranges and make it do its job even if we need to insert some conversions (to be extended to also cover A == B v

[Ada] Default-initialize Nodes component

2011-08-04 Thread Arnaud Charlet
When manipulating bounded hash-table based container objects, that do not otherwise have any explicit initialization expression, the compiler would emit a warning about the object not being initialized, because the Nodes component of the hash table type had not been given an initialization expressi

[Ada] Special cross references in ALFA mode for constants and formals

2011-08-04 Thread Arnaud Charlet
ALFA mode used for formal verification requires different cross references, in which read of constants is absent, and formal is not referenced when used as selector of parameter association. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Yannick Moy * lib-xref-alfa.adb (

[Ada] Allow static string expression as name of Test_Case pragma/aspect

2011-08-04 Thread Arnaud Charlet
Follow-up of implementation of Test_Case pragma/aspect. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Yannick Moy * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure (Analyze_Pragma): allow static string expression for name of Test_Case,

Re: [RFC PATCH] Add alloc_size attribute to the default operator new and operator new[]

2011-08-04 Thread Richard Guenther
On Thu, Aug 4, 2011 at 3:50 PM, Gabriel Dos Reis wrote: > On Thu, Aug 4, 2011 at 8:43 AM, Jason Merrill wrote: >> On 08/04/2011 08:58 AM, Gabriel Dos Reis wrote: >>> >>> Do you intend to rule out garbage collectors? >> >> No, I suppose the rule should be that interleaved access through the >> ret

Re: [RFC PATCH] Add alloc_size attribute to the default operator new and operator new[]

2011-08-04 Thread Gabriel Dos Reis
On Thu, Aug 4, 2011 at 8:43 AM, Jason Merrill wrote: > On 08/04/2011 08:58 AM, Gabriel Dos Reis wrote: >> >> Do you intend to rule out garbage collectors? > > No, I suppose the rule should be that interleaved access through the > returned pointer and other ways is undefined. OK. >> Should not ac

[Ada] Improve support class-wide interface conversions in .NET

2011-08-04 Thread Arnaud Charlet
This patch improves the support for interface conversions in the .NET/JVM compiler extending the current support for attribute 'tag and adding the missing runtime checks required in interface conversions when the tag of the source is unknown at compile time. After this patch the following test comp

Re: [RFC PATCH] Add alloc_size attribute to the default operator new and operator new[]

2011-08-04 Thread Jason Merrill
On 08/04/2011 08:58 AM, Gabriel Dos Reis wrote: Do you intend to rule out garbage collectors? No, I suppose the rule should be that interleaved access through the returned pointer and other ways is undefined. Should not access as raw memory (e.g. through char* or void*) be allowed? No, ac

[Ada] Rewrite dynamic stack usage

2011-08-04 Thread Arnaud Charlet
The dynamic stack usage engine has been rewritten to slightly simplify it. It now provides accurate results on machine where the stack base is known. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Tristan Gingold * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack u

[Ada] Correct placement and checking of Test_Case pragma

2011-08-04 Thread Arnaud Charlet
Follow-up of changes for Test_Case pragma. Pragma is not allowed inside subprogram body, only after separate declaration. No two test cases with same name allowed on same entity. Correct error in checking procedure. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Yannick Moy

Re: [RFC PATCH 0/9] CFG aware dwarf2 cfi generation

2011-08-04 Thread Jan Hubicka
> Jan Hubicka writes: > > > > Cool, will this also help to handle alternate entry points, so we can move > > ahead > > on this area we got stuck years ago? (i.e. add support for alternate entry > > points on > > i386 skipping IP pointer load in PIC mode/using register passing > > conventions)

[Ada] Set Entity for a created Identifier Node

2011-08-04 Thread Arnaud Charlet
The function Identifer_For, called from the code that generates the type declarations for string types in the standard package, now also sets the entity of the generated identifier. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Johannes Kanig * cstand.adb: Add Informati

[Ada] Use unique names in ALFA cross reference in ALI files

2011-08-04 Thread Arnaud Charlet
The formal verification backend relies on unique names for the variables named in ALFA sections of ALI files. Thus, generate these unique names with a new function. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Yannick Moy * frontend.adb (Frontend): remove previous patc

[Ada] Save/restore value of pragma Normalize_Scalars

2011-08-04 Thread Arnaud Charlet
This patch reverses the previous patch which saved/restore the values of pragma Normalize_Scalars because the value of Normalize_Scalars must not be saved/restored because once set to true its value never changes. That is, if a compilation unit has pragma Normalize_Scalars then it forces that value

[Ada] AI05-0020 : universal operators of fixed point and access types

2011-08-04 Thread Arnaud Charlet
This AI specifies that a user-defined equality on an anonymous access type whose designated type is private does not lead to an ambiguity with the universal access equality operator in the body or child units of the defining package. The same is true for a multiplication operator on a private type

[Ada] Special expansion in ALFA for pragma check/precondition/postcondition

2011-08-04 Thread Arnaud Charlet
In ALFA mode, we modify expansion so that pragma check are kept in the code, while pre- and postconditions are kept attached to entities rather than being inserted in the code. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Yannick Moy * exp_prag.adb (Expand_Pragma_Check

[Ada] Correct wrong generation of ALFA cross-references

2011-08-04 Thread Arnaud Charlet
There was a problem with generation of ALFA cross-references for formal verification, which causes a reference to appear in two scopes. Now corrected. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Yannick Moy * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of r

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

2011-08-04 Thread Tobias Burnus
On 08/04/2011 02:44 PM, Mikael Morin wrote: and I belief both "var%comp" and "var" are named. My reading is that a named variable is a variable that is an object-name. That's actually my problem with the standard - it never quite tells what a "named variable" exactly is. I think at least "ptr

Re: [RFC PATCH] Add alloc_size attribute to the default operator new and operator new[]

2011-08-04 Thread Richard Guenther
On Thu, Aug 4, 2011 at 3:01 PM, Richard Guenther wrote: > On Thu, Aug 4, 2011 at 2:58 PM, Gabriel Dos Reis > wrote: >> On Wed, Aug 3, 2011 at 1:14 PM, Jason Merrill wrote: >>> On 08/03/2011 08:46 AM, Richard Guenther wrote: If that's reasonable then adding the malloc attribute should b

[Ada] Enrich ALFA cross references with the type of entity for parameters

2011-08-04 Thread Arnaud Charlet
In formal verification mode, in order to properly detect which parameters may be read/written by a subprogram, a new information is added to ALFA cross references. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Yannick Moy * alfa.ads (ALFA_Xref_Record): add component for

[Ada] Legality rules for formal packages with box initialization

2011-08-04 Thread Arnaud Charlet
AI05-0025 specifies that a formal package is illegal if it includes a named box initialization for an overloaded formal subprogram. This is an extension of an existing rule for instantiations. Compiling proc1.adb in Ada2005 mode must yield the following: proc1.adb:10:05: instantiation abandon

[Ada] AI05-0115: aggregates with invisible components.

2011-08-04 Thread Arnaud Charlet
If a type has an ancestor derived from a private view of its parent, the type may have invisible components and aggregates cannot be written for it. This is an Ada2012 binding interpretation. Compilation of pak1-pak3.adb below must yield: predicatek1-pak3.adb:6:15: no selector "C1" fo

[Ada] Extending library projects with no sources does not build

2011-08-04 Thread Arnaud Charlet
If a library project extending another one has no sources of its own, and there is an exception name with capital letters in the project being extended, then on platform with case-insensitive file names (such a Windows, Darwin or VMS), the invocation of gnatmake to build the library will fail. Tes

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

2011-08-04 Thread Michael Matz
Hi, On Wed, 3 Aug 2011, Kai Tietz wrote: > >> This machinery doen't work in this case > > > > That's why you have to extend it. > > The issue about this machinery is that it assumes that the statement > itself gets transformed, but for normalized form of invert of bitwise > operations it is es

[Ada] Name resolution of class-wide operations with prefix notation

2011-08-04 Thread Arnaud Charlet
When resolving a prefixed call with class-wide actuals, we iterate over the class-wide operations of all ancestors of the controlling type. If the context is a function call any overloading is resolved by context. if the context is a procedure call there must be only one candidate interpretation, a

[Ada] In ALFA mode, do not generate fully qualified names in frontend

2011-08-04 Thread Arnaud Charlet
ALFA mode is for formal verification, which needs to postpone full name qualification after some processing. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Yannick Moy * frontend.adb (Frontend): only qualify names in non-ALFA mode Index: frontend.adb ===

[Ada] Avoid the use of floating point in the front end

2011-08-04 Thread Arnaud Charlet
There was one use of floating point in the front end, in a function to estimate the equivalent decimal exponent for a universal real. While this use was probably OK, because a different estimate shouldn't affect compilation results, in general we do not want anything in the compiler that may produc

Re: [RFC PATCH] Add alloc_size attribute to the default operator new and operator new[]

2011-08-04 Thread Richard Guenther
On Thu, Aug 4, 2011 at 2:58 PM, Gabriel Dos Reis wrote: > On Wed, Aug 3, 2011 at 1:14 PM, Jason Merrill wrote: >> On 08/03/2011 08:46 AM, Richard Guenther wrote: >>> >>> If that's reasonable then adding the malloc attribute should be, too. >>> Finally.  Please.  Doesn't C++0x maybe "fix" the issu

Re: [PLUGIN] compile and install gengtype, install gtype.state

2011-08-04 Thread Richard Guenther
ommitted. > > This breaks bootstrap with a ./contrib/gcc_update updated tree because > gengtype-state.c cannot parse > > (!version  "4.7.0 20110804 (experimental) [trunk revision 161655]") > > please fix. False alarm - I was confused by seeing libstdc++ build. The above is caused by a local VRP patch of mine. Richard. >>        Jakub >> >

[Ada] Get rid of break_start

2011-08-04 Thread Arnaud Charlet
This could be used by the debugger to stop the execution before starting the main subprogram, but no debugger use it. No testcase as there is no functionnal change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Tristan Gingold * bindgen.adb: Remove code the reference o

Re: [RFC PATCH] Add alloc_size attribute to the default operator new and operator new[]

2011-08-04 Thread Gabriel Dos Reis
On Wed, Aug 3, 2011 at 1:14 PM, Jason Merrill wrote: > On 08/03/2011 08:46 AM, Richard Guenther wrote: >> >> If that's reasonable then adding the malloc attribute should be, too. >> Finally.  Please.  Doesn't C++0x maybe "fix" the issue we were >> discussing to death? > > Nope, as far as I can tel

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

2011-08-04 Thread Mikael Morin
On Wednesday 03 August 2011 17:55:00 Tobias Burnus wrote: > > Though variables in the general case can be components, I don't think it > > is the case here as only named variables are involved here. > > Does that sound right? > > The first part of the sentence sounds wrong: A component itself is n

Re: PATCH: Add a testase for PR middle-end/47383

2011-08-04 Thread H.J. Lu
On Thu, Aug 4, 2011 at 2:07 AM, Kirill Yukhin wrote: > HJ, are you sure your Changlog entry is OK? > It was fixed. -- H.J.

Re: [PLUGIN] compile and install gengtype, install gtype.state

2011-08-04 Thread Richard Guenther
use gengtype-state.c cannot parse (!version "4.7.0 20110804 (experimental) [trunk revision 161655]") please fix. >        Jakub >

[Ada] Correct order of evaluation of pre- and postcondition

2011-08-04 Thread Arnaud Charlet
GNAT was evaluating the right part of an AND-THEN pre- or postcondition before the left part, which could cause a wrong exception to be raised in case of a failing pre- or postcondition. On the code attached, compiling and executing now raises a precondition failure instead of a division by zero:

[Ada] Change error message in Ada 2012 mode for misplaced "if" and "case"

2011-08-04 Thread Arnaud Charlet
GNAT was issuing a wrong message about a missing operand in some cases of ill-parenthesized code in Ada 2012 mode. Now it issues a correct message about the missing parentheses. On the following code we get: $ gcc -c -gnat2012 -gnaty3 pred.ads pred.ads:5:30: conditional expression must be parent

Re: Adjust debug output from SMS's get_schdedule_window

2011-08-04 Thread Bernd Schmidt
On 08/04/11 13:16, Richard Sandiford wrote: > Tested in the same way as the previous patch. OK to install? You don't actually need to ask, and based on Revital's reaction, yes. Bernd

[Ada] Omit statement SCO for disabled pragma

2011-08-04 Thread Arnaud Charlet
This change ensures that no statement SCO is emitted for a disabled pragma. For the following compilation, the CS line shall contain only one entry (for the assignment statement), and no entry for the (disabled) pragma Assert. $ gcc -c -gnateS plop.adb $ grep ^C plop.ali C 1 plop.adb CS 8:4-8:15

[Ada] Attributes on predicated subtypes

2011-08-04 Thread Arnaud Charlet
To prevent anomalies with enumeration types with holes and scalar types with complex predicates, the attributes First, Last, and Range cannot be applied to subtypes with predicates. This rule applies only to scalar types. The following must compile quietly in Ada2012 mode: package Pred is type

[Ada] Add support for binder/linker in gnatmake in CodePeer mode

2011-08-04 Thread Arnaud Charlet
In this patch, we enable calls to the binder and linker in gnatmake in CodePeer mode, to help support e.g. detection of global uninitialized variables or e.g. environment task race conditions. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Arnaud Charlet * make.adb (Do_C

Re: [PATCH][RFC] Fix PR49957 - build array index differently

2011-08-04 Thread Mikael Morin
On Thursday 04 August 2011 13:12:04 Richard Guenther wrote: > On Thu, 4 Aug 2011, Richard Guenther wrote: > > On Wed, 3 Aug 2011, Mikael Morin wrote: > > > Hello, > > > > > > On Wednesday 03 August 2011 15:47:37 Richard Guenther wrote: > > > > Comments? Any idea why reversing the loop would break

[Ada] Remote types instance in private part of RCI spec

2011-08-04 Thread Arnaud Charlet
This change fixes a defect whereby instantiating a Remote_Types unit specifying user-defined stream attributes for one of its types in the private part of an RCI unit would cause undefined symbols in calling stubs. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-04 Thomas Quinot

  1   2   >