[Patch ARM Committed] Fix for bootstrap issue with arm_set_fixed_conv_libfunc

2011-08-03 Thread Ramana Radhakrishnan
Hi, Bootstrap in C++ mode broke after a recent commit for arm-linux-gnueabi - Committed as obvious . cheers Ramana 2011-08-04 Ramana Radhakrishnan * config/arm/arm.c (arm_set_fixed_conv_libfunc): Constify maybe_suffix. Index: gcc/config/arm/arm.c ==

Re: [AVR] Fix target/34888

2011-08-03 Thread Denis Chertykov
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 sequence was 9 insns. > > Committed. It seems strange for

Go patch committed: Give error for unknown tuple call

2011-08-03 Thread Ian Lance Taylor
This patch from Roberto Lublinerman fixes PR 49889, which is a case where the compiler failed to give an error for a program which made a tuple assignment from a symbol which was not a function at all. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff

simplify some range tests in rs6000.c

2011-08-03 Thread Alan Modra
This patch came about because I noticed a comment about "the second condition" in rs6000_emit_epilogue no longer matched the code. I was going to fix the comment, then noticed the code could be simplified. In rs6000_emit_epilogue, lr_save_offset is a small positive value (4,8 or 16), or zero when

[v3] check-performance compile fail cleanup

2011-08-03 Thread Benjamin Kosnik
These tests recently started failing at compile time for me due to no declarations for unlink due to no include of unistd.h. So, I did the obvious thing and included it. tested x86/linux -benjamin2011-08-03 Benjamin Kosnik * testsuite/performance/27_io/filebuf_sputn_unbuf.cc: Include unist

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

2011-08-03 Thread Andi Kleen
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) Also alternative e

[SPU] Use define_c_enum

2011-08-03 Thread Richard Henderson
Committed as obvious. r~ * config/spu/spu.md: Use define_c_enum instead of define_constants. (UNSPECV_BLOCKAGE, UNSPECV_LNOP, UNSPECV_SYNC): Rename from UNSPEC_*. (UNSPECV_NOP): New. diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md index 426437a..5742e0d 100644

[AVR] Fix target/34888

2011-08-03 Thread 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 sequence was 9 insns. Committed. r~ PR target/34888 * config/avr/avr.md: New s

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

2011-08-03 Thread Ulrich Weigand
Joseph S. Myers wrote: > The SPU format doesn't support NaNs, so the value of this field isn't > particularly meaningful for SPU. I'm not clear why SPU is actually using > fp-bit; what functions from fp-bit will actually end up getting used by > code built for SPU, and how close does fp-bit ge

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

2011-08-03 Thread Tobias Burnus
Tobias Burnus wrote: Mikael, first, thanks for carefully reading the patch! Updated patch attached. Changes: - parse.c: Cleaned up a bit, use suggested wording, add missing diagnostic (cf. my previous mail) - resolve.c: use suggested wording - coarray_lock_5.f90: Remove. - coarray_lock_6.f90:

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

2011-08-03 Thread Jason Merrill
On 08/02/2011 06:27 PM, H.J. Lu wrote: Here is the updated patch. I updated REG_VALUE_IN_UNWIND_CONTEXT document and added ASSUME_EXTENDED_UNWIND_CONTEXT. OK for trunk? Let's say OK on Monday if nobody objects before then. Jason

PATCH: PR bootstrap/49964: Bootstrap failed with AVX turned on

2011-08-03 Thread H.J. Lu
Hi, I am testing this patch to avoid nested PARALLEL call patterns. OK for trunk if there are no regressions on Linux/AVX? Thanks. H.J. --- 2011-08-03 H.J. Lu PR bootstrap/49964 * config/i386/i386.c (ix86_expand_call): Avoid nested PARALLEL call pattern. (ix

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

2011-08-03 Thread Mikael Morin
Hello, On Wednesday 03 August 2011 15:47:37 Richard Guenther wrote: > Comments? Any idea why reversing the loop would break? Yes, the list of scalarized expressions has to be created in the same order it is consumed. Here the scalarized expressions are array indexes to be precomputed out of th

Re: [build] Move unwinder to toplevel libgcc (v2)

2011-08-03 Thread Benjamin Kosnik
> +++ b/libstdc++-v3/acinclude.m4 > @@ -685,9 +685,9 @@ AC_DEFUN([GLIBCXX_EXPORT_INCLUDES], [ >fi > ># Stuff in the actual top level. Currently only used by libsupc++ > to > - # get unwind* headers from the gcc dir. > - #TOPLEVEL_INCLUDES='-I$(toplevel_srcdir)/gcc > -I$(toplevel_srcdi

[v3] tuple round 2

2011-08-03 Thread Benjamin Kosnik
Hey this fixes up the array::at issue as pointed out on this list. In addition, it adds some more tuple markup for constexpr. I'm going to stage in the tuple work, as some of it is more controversial. tested x86/linux -benjamin2011-08-03 Benjamin Kosnik * include/std/tuple: Mark more cons

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

2011-08-03 Thread Tobias Burnus
Richard Guenther wrote: On Wed, 3 Aug 2011, Richard Guenther wrote: Bootstrap and regtest is currently running on x86_64-unknown-linux-gnu, the reversed loop one was ok (well, apart from those 2-3 fails). Re-bootstrapping currently. The previous patch tested ok. The patch looks OK. I don't k

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

2011-08-03 Thread Tobias Burnus
Mikael Morin wrote: Patch updated. Looks good! Thanks for the further clean up! Tobias

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

2011-08-03 Thread Jan Hubicka
> On 08/03/2011 01:24 PM, Jan Hubicka wrote: > > 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

[wwwdocs] libstdc++ updates for gcc-4.7/changes.html

2011-08-03 Thread Jonathan Wakely
I've committed the attached patch, please add any other v3 changes worth mentioning Index: htdocs/gcc-4.7/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v retrieving revision 1.25 diff -u -r1.25 changes.html --

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

2011-08-03 Thread Richard Henderson
On 08/03/2011 01:24 PM, Jan Hubicka wrote: > 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)

Re: PR 49500 (aliases in emultls)

2011-08-03 Thread Richard Henderson
On 08/03/2011 01:10 PM, Jan Hubicka wrote: > * tree-emultls.c (new_emutls_decl):Add alias_of parameter; > handle aliases. > (create_emultls_var):New function. > (ipa_lower_emutls): Handle aliases correctly. Looks ok. r~

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

2011-08-03 Thread Jan Hubicka
> On 07/14/2011 04:07 PM, Richard Henderson wrote: > > This finally brings us to something that can support shrink-wrapping. > > As mentioned in the description of the last patch, this is 95% of > > what Bernd had in his last 007-dw2cfg patch, except for the remember/ > > restore_state stuff. And

PR 49500 (aliases in emultls)

2011-08-03 Thread Jan Hubicka
Hi, this patch fixes problem with handling aliases in emultls. With new representation of aliases in cgraph/varpool it is actually neccesary to walk the aliases and create corresponding veirables for them. The patch employ strategy of creating all variables for all aliases at a time one of them is

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

2011-08-03 Thread Tom Tromey
> "Peter" == Peter Collingbourne writes: Peter> 2011-08-02 Peter Collingbourne Peter> * expr.c (expand_invoke) Use the type of the method rewrite target. Ok. Tom

Re: [RFC PATCH] Add alloc_size attribute to the default operator new and operator new[] (take 2)

2011-08-03 Thread Jason Merrill
On 08/03/2011 02:26 PM, Jakub Jelinek wrote: As for the properties which the middle-end would like to assume or not from the operator new/operator new[]: 1) for alloc_size it is whether the returned pointer has exactly the requested bytes defined, i.e. can't return a buffer where only fewer bytes

[lra] patch to fix SPEC2000 sixtrack compiler crash

2011-08-03 Thread Vladimir Makarov
The following patch fixes a new crash on SPEC2000 sixtrack on x86-64. LRA failed to find a mode for a constant. When LRA can not find a mode of operand it uses mode from machine description of the insn. It is not enough, in very rare cases the mode can be found only from context. The patch

Re: -freorder-function is broken

2011-08-03 Thread Jan Hubicka
On Fri, Jul 29, 2011 at 10:10 AM, Xinliang David Li wrote: The attached patch fixed the problem. The root cause of the problem is due to the ordering change of profile_estimation and tree_profile pass. In trunk, the function/node frequency is not computed after profile annotation is done lea

[PATCH] Handle rhs CONSTRUCTORs in walk_stmt_load_store_addr_ops (PR tree-optimization/49948)

2011-08-03 Thread Jakub Jelinek
Hi! The following testcase fails because SLP creates vect_something = {&c, &c}; stmt but update addresses taken after parloop doesn't discover the ADDR_EXPRs in the ctor, thus TREE_ADDRESSABLE is dropped from c. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux. Committing to tr

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

2011-08-03 Thread Jakub Jelinek
On Mon, Aug 01, 2011 at 02:27:49PM +0200, Romain Geissler wrote: > ping I went ahead and bootstrapped/regtested/and make install tested your patch (note your mailer wrapped it up so that it didn't apply cleanly), but now that I think about it, it is wrong to put the gengtype binary into $(libsubdi

[RFC PATCH] Add alloc_size attribute to the default operator new and operator new[] (take 2)

2011-08-03 Thread Jakub Jelinek
On Wed, Aug 03, 2011 at 02:31:17PM +0200, Jakub Jelinek wrote: > 2011-08-03 Jakub Jelinek > > PR middle-end/49905 > * decl.c (cxx_init_decl_processing): Add alloc_size (1) attribute > for operator new and operator new []. Unfortunately the patch caused a bunch of regressions,

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

2011-08-03 Thread Gabriel Charette
My linemap implementation just caught a very important failure due to this patch (because of it's massive use of pph_in_string for filenames). We CANNOT free stream->encoder.r.file_data this early as it contains all of the strings streamed in (which are refered to directly from all over the place

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

2011-08-03 Thread Jason Merrill
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 tell nobody raised it with the committee. I have now. I think we ough

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread H.J. Lu
On Wed, Aug 3, 2011 at 7:31 AM, H.J. Lu wrote: > On Tue, Aug 2, 2011 at 3:32 PM, Richard Henderson wrote: >> 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

Re: [M32C] Cleanup reduce_class function

2011-08-03 Thread DJ Delorie
Ok.

Re: -freorder-function is broken

2011-08-03 Thread Xinliang David Li
Ping. David On Fri, Jul 29, 2011 at 10:10 AM, Xinliang David Li wrote: > The attached patch fixed the problem. The root cause of the problem is > due to the ordering change of profile_estimation and tree_profile > pass. In trunk, the function/node frequency is not computed after > profile annota

Re: cfg fixup bug fix

2011-08-03 Thread Xinliang David Li
Ping. David On Sun, Jul 31, 2011 at 11:58 PM, Xinliang David Li wrote: > The attached patch fixed a minor bug in cfg fixup -- the outgoing edge > profile count is not scaled after inlining leading to warnings printed > in IR dump -- 'Invalid sum of ...'. > > Bootstrap and tested on x86-64/linux,

[M32C] Cleanup reduce_class function

2011-08-03 Thread Anatoly Sokolov
Hello. This patch removes the initialization class_sizes array from reduce_class function and instead it uses reg_class_size array. Also reduce_class function use reg_class_contents array instead of class_contents, now. The local class_contents array duplicate global array reg_class_content

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

2011-08-03 Thread Mikael Morin
On Wednesday 03 August 2011 18:22:55 Tobias Burnus wrote: > > --- pr32921.f (révision 177274) > > +++ pr32921.f (copie de travail) > > @@ -46,5 +46,5 @@ > > > > RETURN > > END > > > > ! { dg-final { scan-tree-dump-times "stride" 4 "lim1" } } > > > > -! { dg-final

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Ulrich Weigand
Richard Henderson wrote on 08/03/2011 04:15:26 PM: > On 08/03/2011 07:07 AM, Ulrich Weigand wrote: > > Was this assert intended to impose requirements on target's > > restore_stack_block implemtations? What exactly are those > > supposed to be? > > The assert was not intended to impose requiremen

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/03/11 08:07, Georg-Johann Lay wrote: > Georg-Johann Lay wrote: >> Richard Henderson wrote: >>> On 08/01/2011 11:42 AM, Georg-Johann Lay wrote: Is there a specific reason not to define ACCUMULATE_OUTGOING_ARGS on AVR? >>> Yes. So that

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

2011-08-03 Thread Tobias Burnus
On 08/03/2011 05:55 PM, Mikael Morin wrote: Tobias, I would like your input on lto/pr47839_{0,1}.f90 for which you put the cleanup directive for module pec_mod from pr47839_1.f90 in the pr47839_0.f90 file. As it seems to be an overlook, this patches changes it. Is that correct? I think either

Re: [build] Move unwinder to toplevel libgcc (v2)

2011-08-03 Thread Nick Clifton
Hi Rainer, How should we proceed with this patch, especially given the quite moderate comments from most affected target maintainers? I have no objections to the patch from an ARM or FRV point of view. Cheers Nick

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

2011-08-03 Thread Mikael Morin
On Tuesday 02 August 2011 18:01:35 Mikael Morin wrote: > Thanks. I'll see if I have additional fixes after updating. Here they are. Tobias, I would like your input on lto/pr47839_{0,1}.f90 for which you put the cleanup directive for module pec_mod from pr47839_1.f90 in the pr47839_0.f90 file. As

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

2011-08-03 Thread Tobias Burnus
Mikael, first, thanks for carefully reading the patch! On 08/03/2011 01:43 PM, Mikael Morin wrote: > > PS: It somehow took me quite some time to understand "subcomponent" even > > though the standard is rather clear about it. > Is it? It seems I haven't understood the constraint as you did. It'

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Richard Henderson
On 08/03/2011 08:47 AM, Georg-Johann Lay wrote: > With ACCUMULATE_OUTGOING_ARGS it looks much better: there is just > one such block in the prologue/epilogue. > > I think ACCUMULATE_OUTGOING_ARGS would be a win definitely. That's what I thought too, but with the test case in PR49881 I couldn't ma

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Georg-Johann Lay
Richard Henderson wrote: > On 08/03/2011 07:07 AM, Georg-Johann Lay wrote: >> #include >> >> void foo () >> { >> printf ("%d %d %d", 1, 2, 3); >> printf ("%d %d %d", 3, 4, 5); >> printf ("%d %d %d", 1, 4, 5); >> } >> >> Attached the output: The compiler happily pushes onto the stack >>

Re: [trans-mem] Beginning of refactoring

2011-08-03 Thread Richard Henderson
On 08/03/2011 03:50 AM, Torvald Riegel wrote: > Fix rollback and queries of transaction ID. > > * beginend.cc (GTM::gtm_transaction::rollback): Roll back tx id as well. > * query.cc (_ITM_getTransactionId): There is no active transaction if > the current nesting level is

Re: [google] Backport r175009 from trunk to google/gcc-4_6 (issue4815082)

2011-08-03 Thread Diego Novillo
On Wed, Aug 3, 2011 at 03:17, Guozhi Wei wrote: > Hi > > I want to port r175009 from trunk to google/gcc-4_6 since it fixed 3 dejagnu > failures for arm backend. > > Tested on x86-64 with > make check-gcc RUNTESTFLAGS="vect.exp" > > Tested on arm qemu with > make check-gcc RUNTESTFLAGS="--target_b

Re: [PATCH 4/6] Shrink-wrapping

2011-08-03 Thread Richard Sandiford
Bernd Schmidt writes: > +@findex simple_return > +@item (simple_return) > +Like @code{(return)}, but truly represents only a function return, while > +@code{(return)} may represent an insn that also performs other functions > +of the function epilogue. Like @code{(return)}, this may also occur in

Re: RFC: add a testsuite for libstdc++ pretty-printers

2011-08-03 Thread Tom Tromey
I'm finally getting back to this. This patch adds test suite support for the libstdc++ pretty-printers. These tests require a new gdb, so following Mike Stump's advice and the consensus of the libstdc++ list, we now check for an appropriate gdb feature before deciding whether to run the tests. I

[PATCH 7/8] Factor out caching logic for INSN_COND

2011-08-03 Thread Alexander Monakov
From: Sergey Grechanik Sometimes we need to be able to call sched_get_condition_with_rev from selective scheduler for an instruction with zero luid (i.e. before h_d_i_d had been extended). On such occasion, we need to bypass the caching and use "old", uncached lookup. The patch factors out cach

[PATCH 8/8] Only merge deps status for true dependencies

2011-08-03 Thread Alexander Monakov
From: Sergey Grechanik This patch avoids changing speculative bits of a register use when it is moved up above a speculation check where that register is used as the address register. We should only call ds_full_merge when the producer (speculation check) writes to a register. (A similar check

[PATCH 2/8] Make more insns unique

2011-08-03 Thread Alexander Monakov
From: Dmitry Melnik This patch prevents duplicating (as bookkeeping code) instructions that are either volatile or recognized by cannot_copy_insn_p target hook (in addition to already present restrictions). This avoids generating incorrect assembler with duplicate labels on ARM. 2011-08-04 Dmi

[PATCH 6/8] Try successors to find seqno

2011-08-03 Thread Alexander Monakov
From: Sergey Grechanik This patch fixes a problem when new jumps created in sel_redirect_edge_and_branch_force could not get correct seqnos. get_seqno_of_a_pred is renamed to get_seqno_for_a_jump. Implementation-wise, it supports looking at multiple predecessors, and, if that fails, also at succ

[PATCH 5/8] Drop an incorrect assert

2011-08-03 Thread Alexander Monakov
From: Dmitry Melnik This fixes a bug caused by trying to initialize BB_AV_SET of a newly generated jump. It assumes that jump is only generated in new bb, while it can be replaced in same BB by try_redirect_by_replacing_jump, if jump was conditional and was pointing to the same BB by its both ed

[PATCH 4/8] Properly loop over all hard regs for mode

2011-08-03 Thread Alexander Monakov
From: Sergey Grechanik There are several places where bitmap_bit_p function is used to test if some register is in the regset. We need to take into account the fact that depending on mode, we need to test multiple hard regs. 2011-08-04 Sergey Grechanik * sel-sched-ir.h (register_una

[PATCH 3/8] Fix usage of hard_regno_nregs before reload

2011-08-03 Thread Alexander Monakov
From: Sergey Grechanik This fixes one place where hard_regno_nregs is incorrectly guarded by reload_completed (as if before reload all regs are pseudos). 2011-08-04 Sergey Grechanik * sel-sched.c (verify_target_availability): Fix usage of hard_regno_nregs. diff --git a/gcc/s

[PATCH 1/8] Take maximum spec when merging exprs

2011-08-03 Thread Alexander Monakov
From: Dmitry Melnik EXPR_SPEC is an indicator of the speculativeness of an expression (an instruction or just an rhs), as it is incremented each time the expression is moved up across a conditional branch. When merging expr attributes for similar exprs available from two destinations of a branch

Selective scheduler fixes

2011-08-03 Thread Alexander Monakov
Hello, This is a series of selective scheduler bug fixes. They fix problems that have been discovered during internal testing, and one patch is necessary as preparation to predication support in the selective scheduler (predication patches will be submitted separately later). I'm sorry that patc

[Ada] Set_Command_Line: improve handling of grouped switches with parameters

2011-08-03 Thread Arnaud Charlet
The following code should find two switches on the command line: -gnatyL (with parameter "1") and -gnatya. Instead, we used to find a single switch -gnatyL with parameter "1a". Define_Switch (Config, "-gnatyL!"); Define_Switch (Config, "-gnatya"); Define_Prefix (Config, "-gnaty"); S

[Ada] Only allow boolean conditional expression in ALFA

2011-08-03 Thread Arnaud Charlet
Previous patch allowed any type of conditional expression in ALFA. Now restrict this to boolean expressions only. Possibly subject to change later on when translation from ALFA improves. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-03 Yannick Moy * sem_ch4.adb (Analyze_Co

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

2011-08-03 Thread Richard Guenther
On Wed, 3 Aug 2011, Richard Guenther wrote: > > This fixes PR49957 by keeping the array index into a multi-dimensional > array in optimal associated form which is ((off + outermost) + ...) + > innermost) + constant) so that dependence analysis can properly > handle it. It doesn't work right now

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Richard Henderson
On 08/03/2011 07:07 AM, Ulrich Weigand wrote: > Was this assert intended to impose requirements on target's > restore_stack_block implemtations? What exactly are those > supposed to be? The assert was not intended to impose requirements, but to figure out if I needed to do anything special here.

[Ada] Extend ALFA marks to more types of nodes

2011-08-03 Thread Arnaud Charlet
Follow-up of work on marking nodes as being in ALFA for formal verification. Mark more nodes in ALFA when a reasonable translation exists for verification. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-03 Yannick Moy * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark su

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Richard Henderson
On 08/03/2011 07:07 AM, Georg-Johann Lay wrote: > #include > > void foo () > { > printf ("%d %d %d", 1, 2, 3); > printf ("%d %d %d", 3, 4, 5); > printf ("%d %d %d", 1, 4, 5); > } > > Attached the output: The compiler happily pushes onto the stack > but pops only at the end of the fun

[Ada] Finalization actions during abort

2011-08-03 Thread Arnaud Charlet
This patch reimplements how finalization is carried out during an abort. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-03 Hristian Kirtchev * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal From_Abort. When finalization was triggered by an abort

[Ada] Improper optimization of range checks

2011-08-03 Thread Arnaud Charlet
Several static evaluation routines use Determine_Range to establish the bounds of a non-static expression. If overflow cheks are enabled, the range of the result of unary and binary operations may raise an exception, and cannot be assumed to evaluate correctly without a run-time check. This patch p

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

2011-08-03 Thread Kai Tietz
2011/8/3 Michael Matz : > Hi, > > On Wed, 3 Aug 2011, Kai Tietz wrote: > >> > Implement all of this in the normal reassoc machinery that already >> > exists. Don't implement your own walker (which btw is superlinear >> > because you recurse into both operands).  If no simplifications were >> > poss

[Ada] Make GNAT.AWK API compatible with Ada 2005.

2011-08-03 Thread Arnaud Charlet
Ada 2005 does not allow returning limited objects from a function. As this interface should be callable from Ada 95 and Ada 2005 we have changed the API to return access type instead. This minor upward compatibility issue is very easy to fix. A ".all" needs to be added to calls to routines Current

[Ada] Tag-indeterminate calls

2011-08-03 Thread Arnaud Charlet
A function call is tag-indeterminate if the function dispatches on result and if the return type is tagged. This depends on the current view of the type. Previously the predicate only checked on whether the function was known to dispatch on result. Tested on x86_64-pc-linux-gnu, committed on trunk

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

2011-08-03 Thread H.J. Lu
Hi, I checked in this patch to add a testase for PR middle-end/47383. H.J. --- Index: gcc.dg/torture/pr47383.c === --- gcc.dg/torture/pr47383.c(revision 0) +++ gcc.dg/torture/pr47383.c(revision 0) @@ -0,0 +1,30 @@ +/* { dg-do

[Ada] Support for controlled objects allocated on the heap for .NET/JVM

2011-08-03 Thread Arnaud Charlet
The following patch adds partial support for controlled objects allocated on the heap for .NET/JVM compilation environments. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-03 Hristian Kirtchev * exp_ch13.adb: Add with and use clause for Targparm; (Expand_N_Free_Stat

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

2011-08-03 Thread Joseph S. Myers
On Wed, 3 Aug 2011, Rainer Orth wrote: > * Even worse, there are a couple of formats/targets that do use > fp-bit.c, don't yet define QUIET_NAN_NEGATED, but have qnan_msb_set = > false: > > qnan_msb_setuses fp-bit > > mips_single_forma

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread H.J. Lu
On Tue, Aug 2, 2011 at 3:32 PM, Richard Henderson wrote: > 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

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

2011-08-03 Thread Michael Matz
Hi, On Wed, 3 Aug 2011, Kai Tietz wrote: > > Implement all of this in the normal reassoc machinery that already > > exists. Don't implement your own walker (which btw is superlinear > > because you recurse into both operands).  If no simplifications were > > possible you have to fold back the

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

2011-08-03 Thread Richard Guenther
On Wed, Aug 3, 2011 at 3:32 PM, Kai Tietz wrote: > 2011/8/3 Michael Matz : >> Hi, >> >> On Tue, 2 Aug 2011, Kai Tietz wrote: >> >>> this patch improves the ability of reassociation pass to simplifiy >>> more complex bitwise-binary >>> operations with comparisons.  We break-up for this patch statem

PATCH PR target/47744: [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-08-03 Thread H.J. Lu
Hi, I checked in the following testcases for PR target/47744. H.J. --- Index: gcc.dg/torture/pr47744-2.c === --- gcc.dg/torture/pr47744-2.c (revision 0) +++ gcc.dg/torture/pr47744-2.c (revision 0) @@ -0,0 +1,40 @@ +/* { dg-do comp

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Georg-Johann Lay
what we want? RETURN_POPS_ARGS cannot help here. Johann .file "printf.c" __SREG__ = 0x3f __SP_H__ = 0x3e __SP_L__ = 0x3d __tmp_reg__ = 0 __zero_reg__ = 1 ; GNU C (GCC) version 4.7.0 20110803 (experimental) (avr) ; compiled by GNU C version 4.3.2 [gcc-4_3-branch revisio

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Ulrich Weigand
Richard Henderson wrote: > emit_stack_restore (SAVE_BLOCK, old_stack_level); > stack_pointer_delta = old_stack_pointer_delta; > + > + /* ??? Is this assert warrented, given emit_stack_restore? > + or should we just mark the last insn no matter what? */ > + las

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

2011-08-03 Thread Jakub Jelinek
On Wed, Aug 03, 2011 at 03:55:39PM +0200, Richard Guenther wrote: > On Wed, Aug 3, 2011 at 3:06 PM, Paolo Bonzini wrote: > > On 08/03/2011 02:46 PM, Richard Guenther wrote: > >> > >> If that's reasonable then adding the malloc attribute should be, too. > > > > Making aliasing stricter for -D_FORTI

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

2011-08-03 Thread Richard Guenther
On Wed, Aug 3, 2011 at 3:06 PM, Paolo Bonzini wrote: > On 08/03/2011 02:46 PM, Richard Guenther wrote: >> >> If that's reasonable then adding the malloc attribute should be, too. > > Making aliasing stricter for -D_FORTIFY_SOURCE=2 sounds wrong though. The patch unconditionally adds malloc_size.

Re: Fix Solaris Ada bootstrap

2011-08-03 Thread Arnaud Charlet
> Ok for mainline? > > Thanks. > Rainer > > > 2011-08-03 Rainer Orth > > * link.c: Include "auto-host.h" before system headers. OK, thanks.

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

2011-08-03 Thread Richard Guenther
This fixes PR49957 by keeping the array index into a multi-dimensional array in optimal associated form which is ((off + outermost) + ...) + innermost) + constant) so that dependence analysis can properly handle it. It doesn't work right now because we build the expression in reverse order, fold

[build] Move unwinder to toplevel libgcc (v2)

2011-08-03 Thread Rainer Orth
This is the revised/updated version of the patch originally posted at [build] Move unwinder to toplevel libgcc http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01452.html and reposted as CFT at http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00201.html It should incorporate all

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

2011-08-03 Thread Kai Tietz
2011/8/3 Michael Matz : > Hi, > > On Tue, 2 Aug 2011, Kai Tietz wrote: > >> 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

Re: Fix Tru64 UNIX Ada bootstrap

2011-08-03 Thread Arnaud Charlet
> Fixed as follows, bootstrap is well beyond the failure now. > > Ok for mainline? OK, thanks.

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

2011-08-03 Thread Michael Matz
Hi, On Tue, 2 Aug 2011, Kai Tietz wrote: > 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.

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

2011-08-03 Thread Romain Geissler
Hi 2011/8/2 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

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

2011-08-03 Thread Paolo Bonzini
On 08/03/2011 02:46 PM, Richard Guenther wrote: If that's reasonable then adding the malloc attribute should be, too. Making aliasing stricter for -D_FORTIFY_SOURCE=2 sounds wrong though. Paolo

Fix Tru64 UNIX Ada bootstrap

2011-08-03 Thread Rainer Orth
Tru64 UNIX Ada bootstrap was broken, too: /vol/gcc/src/hg/trunk/solaris/gcc/ada/init.c: In function 'void __gnat_error_handler(int, siginfo_t*, void*)': /vol/gcc/src/hg/trunk/solaris/gcc/ada/init.c:382:50: error: cast from type 'const char*' to type 'char*' casts away qualifiers [-Werror=cast-qu

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

2011-08-03 Thread Richard Guenther
On Wed, Aug 3, 2011 at 2:31 PM, Jakub Jelinek wrote: > Hi! > > As mentioned in PR49905, -D_FORTIFY_SOURCE{,=2} handles e.g. > malloc (4) or malloc (16) well, knowing that the resulting pointer > has object size 4 resp. 16, but for new int or new int[4], it currently > doesn't assume anything (i.e.

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

2011-08-03 Thread Jakub Jelinek
Hi! As mentioned in PR49905, -D_FORTIFY_SOURCE{,=2} handles e.g. malloc (4) or malloc (16) well, knowing that the resulting pointer has object size 4 resp. 16, but for new int or new int[4], it currently doesn't assume anything (i.e. __builtin_object_size (new int, 0) returns -1). While I see the

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

2011-08-03 Thread Richard Guenther
On Wed, Aug 3, 2011 at 1:47 PM, Kai Tietz wrote: > Hello, > > I noticed that I disallowed expansion of ~(X bitwise-binary-ops) for > none-boolean type.  This limitiation isn't necessary and prevented > even some pattern-detections. > I've added 3 new testcases for this to the patch. You seem to u

Re: [RFC] Cleanup DW_CFA_GNU_args_size handling

2011-08-03 Thread Georg-Johann Lay
Richard Henderson wrote: > On 08/01/2011 11:42 AM, Georg-Johann Lay wrote: >> Is there a specific reason not to define >> ACCUMULATE_OUTGOING_ARGS on AVR? > > Yes. So that you can use PUSH. But as I said in PR49881, > you probably want to provide -maccumulate-outgoing-args. > > I have a follow-

[PATCH] Fix PR49958

2011-08-03 Thread Richard Guenther
This fixes a wrong re-association which can introduce undefined overflow. The fix is to perform this only when overflow is known to wrap. Bootstrap and regtest pending on x86_64-unknown-linux-gnu. Richard. 2011-08-03 Richard Guenther PR middle-end/49958 * fold-const.c (fold

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

2011-08-03 Thread Torvald Riegel
Based on recent discussions among the C++ TM specification group, static constructors should be allowed in transactional (i.e., transaction_safe) code. GCC should have a wrapper assigment for __cxa_guard_acquire and __cxa_guard_release, and libitm should implement wrappers that guarantee atomicity

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

2011-08-03 Thread Torvald Riegel
Tests that new transactions can be started from both transaction_pure and transaction_unsafe code. This also checks proper handling of reentrant nesting in the serial_lock implementation (reentrant in the sense that we go from transactional to nontransactional to transactional code). This test curr

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

2011-08-03 Thread Kai Tietz
Hello, I noticed that I disallowed expansion of ~(X bitwise-binary-ops) for none-boolean type. This limitiation isn't necessary and prevented even some pattern-detections. I've added 3 new testcases for this to the patch. ChangeLog 2011-08-03 Kai Tietz * tree-ssa-reassoc.c (gimple b

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

2011-08-03 Thread Mikael Morin
Hello, On Tuesday 02 August 2011 18:08:05 Tobias Burnus wrote: > 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. [...] > > PS: It somehow took me

Re: C++ PATCH for c++/49813 (__builtin_isinf in constant expression)

2011-08-03 Thread Gabriel Dos Reis
On Mon, Aug 1, 2011 at 1:12 PM, Jason Merrill wrote: > Another issue raised in 49813 is that morally_constexpr_builtin_function_p > was rejecting __builtin_isinf because it has a variadic signature.  I'm > changing potential_constant_expression_1 to just allow any built-in function > in a constexp

  1   2   >